Closed dbezhetskov closed 3 years ago
It is also weird that we can't use ref-types in select without type annotations, it forces engines to add vec(valtypes)
for each select instruction. It is ok since select
is a rare instruction but it is still small overhead here that we can avoid.
Subtyping has been deferred, but not dropped forever. The combination of subtyping on refs and allowing them as operands to unannotated select
would always force us into computing lubs, which we want to avoid. So allowing plain select on refs now would not be future-proof wrt the later addition of subtyping.
ah, I see, thanks for the clarification @rossberg .
After removing subtyping rules (https://github.com/WebAssembly/reference-types/pull/87) it is unclear for me why we need type annotated select? Right now we can infer the result type of select in the same way as we do for untyped version. Is it just for future when we are able to return multiple values from select?