You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: first (before refactoring), we can try to check the invariant at runtime, and if it holds, we should be able to do it
Define ErasedType – for now, just have case AnyRef(rsc: Bool, csym: ClassLikeSymol) and case Primitive(‹things like i31›)
For now, we add an ErasedType field to the symbols that represent values; it starts out as absent and will be populated by the resolution process. When absent, we just assime Object (ie AnyRef(false, ObjectSymol)).
Add resultType: ErasedType to functions
Add a pass of explicit coercions/unboxing, allowing to produce WASM that doesn't treat everything as anyref
Eventual goal: use this to compile resources (using refcounting).
Original items (probably won't do for now):
Define ErasedType – for now, just have case Object (top), case AnyRef(rsc: Bool), case Union(Ls[ErasedType]) and case Primitive(‹things like i31›)
Make params: Ls[BlockParamList] in functions
Change Ref, MemberRef, and Select wrap their symbol inside a new symbol kind BlockSymbol which includes an ErasedType
TODOs:
RefintoErasedType– for now, just havecase AnyRef(rsc: Bool, csym: ClassLikeSymol)andcase Primitive(‹things like i31›)ErasedTypefield to the symbols that represent values; it starts out as absent and will be populated by the resolution process. When absent, we just assimeObject(ieAnyRef(false, ObjectSymol)).resultType: ErasedTypeto functionsanyrefEventual goal: use this to compile resources (using refcounting).
Original items (probably won't do for now):
ErasedType– for now, just havecase Object(top),case AnyRef(rsc: Bool),case Union(Ls[ErasedType])andcase Primitive(‹things like i31›)params: Ls[BlockParamList]in functionsRef,MemberRef, andSelectwrap their symbol inside a new symbol kindBlockSymbolwhich includes anErasedType