Skip to content

More type metadata #69

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
Apr 25, 2025
Merged

More type metadata #69

merged 13 commits into from
Apr 25, 2025

Conversation

jberthold
Copy link
Member

@jberthold jberthold commented Apr 24, 2025

Emit metadata for all types that matter, in particular reference types and array types.
Function types are only referred to as strings (elided in the golden tests), some other types are still not considered but they don't seem relevant to our purpose.

Also included:

  • add type of TyConst in RigidTy::Array case to collected types in collect_ty
  • optionally keep json files after running test-ui
RigidTy Metadata Information
Bool PrimitiveType RigidTy existed
Char PrimitiveType RigidTy existed
Int(IntTy) PrimitiveType RigidTy existed
Uint(UintTy) PrimitiveType RigidTy existed
Float(FloatTy) PrimitiveType RigidTy existed
Adt(AdtDef, GenericArgs) EnumType existed
StructType existed
UnionType ADDED
Foreign(ForeignDef)
Str PrimitiveType RigidTy ADDED
Array(Ty, TyConst) ArrayType ElemType, len ADDED
Pat(Ty, Pattern)
Slice(Ty) ArrayType ElemType ADDED
RawPtr(Ty, Mutability) PtrType PointeeType ADDED
Ref(Region, Ty, Mutability) RefType PointeeType ADDED
FnDef(FnDef, GenericArgs) FunType type string only ADDED
FnPtr(PolyFnSig) FunType type string only ADDED
Closure(ClosureDef, GenericArgs) FunType type string only ADDED
Coroutine(CoroutineDef, GenericArgs, Movability)
Dynamic(Vec<Binder>, Region, DynKind)
Never ?
Tuple(Vec) TupleType Component types ADDED
CoroutineWitness(..)

@jberthold jberthold requested review from dkcumming and gtrepta April 24, 2025 06:45
@jberthold jberthold marked this pull request as ready for review April 24, 2025 06:45
@jberthold jberthold self-assigned this Apr 24, 2025
@jberthold jberthold force-pushed the more-type-metadata branch from 24b9cbc to 0c9914d Compare April 24, 2025 07:54
Copy link
Contributor

@gtrepta gtrepta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I can get my TyCollector changes based off of this.

jberthold and others added 3 commits April 25, 2025 09:13
@jberthold jberthold merged commit d9e2258 into master Apr 25, 2025
3 checks passed
@jberthold jberthold deleted the more-type-metadata branch April 25, 2025 00:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants