diff options
author | Frank Emrich <git@emrich.io> | 2024-04-04 18:46:04 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-04 10:46:04 -0700 |
commit | 365f12ed2388c610511bd17ce097021e0babcaa9 (patch) | |
tree | a5243d82ad8ba8843d6e483d1d4c395dcb91fd87 /test/spec | |
parent | 83d3059361c17db19080735ae6a85435f7308c80 (diff) | |
download | binaryen-365f12ed2388c610511bd17ce097021e0babcaa9.tar.gz binaryen-365f12ed2388c610511bd17ce097021e0babcaa9.tar.bz2 binaryen-365f12ed2388c610511bd17ce097021e0babcaa9.zip |
Typed continuations: nocont and cont basic heap types (#6468)
This PR is part of a series that adds basic support for the typed
continuations/wasmfx proposal.
This particular PR adds cont and nocont as top and bottom types for
continuation types, completely analogous to func and nofunc for function types
(also: exn and noexn).
Diffstat (limited to 'test/spec')
-rw-r--r-- | test/spec/typed_continuations.wast | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/spec/typed_continuations.wast b/test/spec/typed_continuations.wast index 5f7b86f6c..e3bddbf77 100644 --- a/test/spec/typed_continuations.wast +++ b/test/spec/typed_continuations.wast @@ -5,6 +5,14 @@ (func $id (param $x (ref $ct)) (result (ref $ct)) (local.get $x) ) + + (func $cont-nocont (param $x (ref null $ct)) + (local $l1 (ref null cont)) + (local $l2 (ref null $ct)) + (local.set $l1 (local.get $x)) ;; $ct <: cont + (local.set $l2 (ref.null nocont)) ;; nocont <: $ct + (local.set $l1 (ref.null nocont)) ;; nocont <: cont + ) ) (assert_invalid |