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
I think the immediate reason is that type checking should account for subtyping, and make sure to compare heap types instead of assuming all reference types have an index (i.e., are a "concrete reference type" as described in the GC spec).
More generally, I think the type-checker needs to also be extended to look at the type section (or a more abstract "type store") to look up type indices when checking equality of concrete types. Alternatively, concrete ref types should be stored pre-canonicalized as a pointer (this would depend on #1828) to a representative type in the canonicalized type store.
These are all needed eventually for GC support too.
The text was updated successfully, but these errors were encountered:
takikawa
changed the title
Typed funcref support should support subtyping and "concrete type" equality
Type funcref crash due to ref type getting read as "any" type instead of a ref type
Apr 4, 2022
A test like the following currently crashes in type-checking:
Error:
I think the immediate reason is that type checking should account for subtyping, and make sure to compare heap types instead of assuming all reference types have an index (i.e., are a "concrete reference type" as described in the GC spec).
More generally, I think the type-checker needs to also be extended to look at the type section (or a more abstract "type store") to look up type indices when checking equality of concrete types. Alternatively, concrete ref types should be stored pre-canonicalized as a pointer (this would depend on #1828) to a representative type in the canonicalized type store.
These are all needed eventually for GC support too.
The text was updated successfully, but these errors were encountered: