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
{{ message }}
This repository was archived by the owner on Apr 25, 2025. It is now read-only.
Following up on observations in #124 (comment), I am wondering whether it'd make sense to introduce a constant initializer expression for i31ref globals, because currently there is no trivial way to declare an i31ref typed global, requiring workarounds like
Following up on observations in #124 (comment), I am wondering whether it'd make sense to introduce a constant initializer expression for
i31ref
globals, because currently there is no trivial way to declare ani31ref
typed global, requiring workarounds likeSuitable solutions from simplest to most general seem to be (1) the introduction of
i31.zero
or (2) a variant of
i31.new
taking an immediate instead of an expressionor, radically, (3) allowing global initializers to be defaultable and making
i31ref
default to contain value0
The latter is more complicated but leads to potential code size savings, e.g. in the best case
further leading to (4) allowing to omit global initializers entirely, like on locals
Given how fundamental the problem seems, I might as well be missing something?
The text was updated successfully, but these errors were encountered: