Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
These Wasm nodes need to be annotated with their return type, and if the return type is more than nullary or unary, then this type needs to be defined in the Wasm module type table. This refactors the story around `if_` etc. to allow that: `E.if_ env tys thn else` will register the types as needed But in many places we know statically that there is only zero or one return type. For them, `G.if0` and `G.if1` can be used for cleaner code and to emphasize their “purity”. In a similar vein, `G.loop0` is introduced; since our loops never produce values on the stack, there is no `loop_` with multi-value result. Extracted from #1459, but I’d like to have it on master to prevent merge conflicts in #1459 (which is a long-running branch since May 2020…)
- Loading branch information