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.
Consider a module defining two structurally equivalent types:
(type $u (struct i32))
(type $v (struct i32))
Should (rtt.canon $u) and (rtt.canon $v) return the same RTT, or two different RTTs?
What if $u and $v are defined in two separate modules?
This impacts e.g. behavior of a check like: (ref.test (struct.new $u (i32.const 42) (rtt.canon $u)) (rtt.canon $v)).
A reason for returning the same RTT is that this appears to be a requirement for allowing cross-module interop to include RTT-involving operations without forcing the modules to agree on who exports and who imports the shared RTT. And behavior within a module should probably be the same as behavior across module boundaries.
A reason for returning different RTTs is that RTTs having nominal semantics was my initial understanding (and, in consequence, is the current behavior of V8's prototype implementation), but on further thought that was probably wrong (at least for rtt.canon) :-)