binaryen icon indicating copy to clipboard operation
binaryen copied to clipboard

Typed continuations: cont.new instructions

Open frank-emrich opened this issue 2 years ago • 0 comments

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.

frank-emrich avatar Feb 14 '24 20:02 frank-emrich