Skip to content

Commit

Permalink
Backend: Prepare if_, block_ and loop_ for multi-value
Browse files Browse the repository at this point in the history
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”.

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
nomeata committed Oct 22, 2021
1 parent 7fe19ef commit efbf87f
Show file tree
Hide file tree
Showing 3 changed files with 140 additions and 129 deletions.
Loading

0 comments on commit efbf87f

Please sign in to comment.