Daniel Hillerström 3e85182ab7
Stack switching proposal support (#7041)
This patch implements text and binary encoding/decoding support for the
stack switching proposal. It does so by adapting the previous
typed-continunations implementation. Particular changes:

* Support for new `resume` encoding.
* Added support for `resume_throw` and `switch`.
* Feature flag `typed-continuations` has been renamed to
`stack-switching`.

A small unfortunate implementation detail is that the internal name
`Switch` was already taken by the `br_table` instruction, so I opted to
give the `switch` instruction the internal name `StackSwitch`.

A minor detail is that I have reordered the declarations/definitions of
the stack switching instructions such that they appear in ascending
order according to their opcode value (this is the same order that the
stack-switching explainer document present them in).

I can look into adding validation support in a subsequent patch.
2025-01-28 21:32:48 +00:00
..