summaryrefslogtreecommitdiff
path: root/test/heap-types.wast.fromBinary
diff options
context:
space:
mode:
authorThomas Lively <tlively@google.com>2022-12-07 12:41:49 -0600
committerGitHub <noreply@github.com>2022-12-07 18:41:49 +0000
commit2590620a32190f98b29c7d9726865aa8082b4023 (patch)
tree22bb9475aecafe5aeae4977fe1b0edb49053f2e7 /test/heap-types.wast.fromBinary
parent3253df552729e771a31decf0e29a775f888b1e6f (diff)
downloadbinaryen-2590620a32190f98b29c7d9726865aa8082b4023.tar.gz
binaryen-2590620a32190f98b29c7d9726865aa8082b4023.tar.bz2
binaryen-2590620a32190f98b29c7d9726865aa8082b4023.zip
Update tests ahead of transition from `data` to `struct` (#5320)
The upstream WasmGC spec has removed `data` and introduced `struct`. To make the migration easier, we have been supporting `struct` as an `alias` for `data` and `structref` as an alias for `dataref`. Update the tests to prefer the `struct` aliases over `data` for test input to make the future migration easier. Also update some tests that had stale comments about ref.null types being updated and remove some tests for instructions like br_on_data and ref.as_data that do not make sense without a `data` type.
Diffstat (limited to 'test/heap-types.wast.fromBinary')
-rw-r--r--test/heap-types.wast.fromBinary37
1 files changed, 8 insertions, 29 deletions
diff --git a/test/heap-types.wast.fromBinary b/test/heap-types.wast.fromBinary
index fd2dbeed6..7bc780796 100644
--- a/test/heap-types.wast.fromBinary
+++ b/test/heap-types.wast.fromBinary
@@ -219,7 +219,6 @@
(local $y anyref)
(local $z anyref)
(local $temp-func funcref)
- (local $temp-data dataref)
(local $temp-i31 i31ref)
(block $label$1
(local.set $z
@@ -239,9 +238,9 @@
)
)
(drop
- (block $label$3 (result dataref)
+ (block $label$3 (result i31ref)
(local.set $y
- (br_on_data $label$3
+ (br_on_i31 $label$3
(local.get $x)
)
)
@@ -249,27 +248,17 @@
)
)
(drop
- (block $label$4 (result i31ref)
- (local.set $y
- (br_on_i31 $label$4
- (local.get $x)
- )
- )
- (ref.null none)
- )
- )
- (drop
- (block $label$5 (result (ref any))
- (br_on_non_null $label$5
+ (block $label$4 (result (ref any))
+ (br_on_non_null $label$4
(local.get $x)
)
(unreachable)
)
)
(drop
- (block $label$6 (result anyref)
+ (block $label$5 (result anyref)
(local.set $temp-func
- (br_on_non_func $label$6
+ (br_on_non_func $label$5
(local.get $x)
)
)
@@ -277,19 +266,9 @@
)
)
(drop
- (block $label$7 (result anyref)
- (local.set $temp-data
- (br_on_non_data $label$7
- (local.get $x)
- )
- )
- (ref.null none)
- )
- )
- (drop
- (block $label$8 (result anyref)
+ (block $label$6 (result anyref)
(local.set $temp-i31
- (br_on_non_i31 $label$8
+ (br_on_non_i31 $label$6
(local.get $x)
)
)