binaryen
binaryen copied to clipboard
Typed continuations: cont.new instructions
This PR is part of a series that adds basic support for the typed continuations/wasmfx proposal.
This particular PR adds support for the cont.new instruction for creating continuations, documented here.
In short, these instructions are of the form (cont.new $ct) where $ct must be a continuation type. The instruction takes a single (nullable) function reference as its argument, which means that the folded representation of the instruction is of the form (cont.new $ct (foo ...)).
Support for the instruction is implemented in both the old and the new wat parser.
Note that this PR does not implement validation of the new instruction.