This repository was archived by the owner on Apr 25, 2025. It is now read-only.
This repository was archived by the owner on Apr 25, 2025. It is now read-only.
Clarification on i31ref nullability #124
Closed
Description
In the MVP document, under reference types, the following is noted:
anyref
is a new reference type
anyref == (ref null any)
eqref
is a new reference type
eqref == (ref null eq)
i31ref
is a new reference type
i31ref == (ref i31)
with i31ref
equalling (ref i31)
not (ref null i31)
. This turned up during prototyping in Binaryen where the initial strategy was to default to the abbreviations, but with (ref i31) != (ref null i31)
, and with (ref null i31)
theoretically constructible, we'd then be missing a canonical name for (ref null i31)
. This is not a problem, as we can design this differently by defaulting to the heaptype representation with the abbreviations merely being aliases, but I'd like to know more about the design here, as it might also be that this is either an oversight or that it hints at (ref null i31)
being illegal?
Metadata
Metadata
Assignees
Labels
No labels