summaryrefslogtreecommitdiff
path: root/test/lit/passes/optimize-instructions-call_ref.wast
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/lit/passes/optimize-instructions-call_ref.wast
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/lit/passes/optimize-instructions-call_ref.wast')
-rw-r--r--test/lit/passes/optimize-instructions-call_ref.wast14
1 files changed, 7 insertions, 7 deletions
diff --git a/test/lit/passes/optimize-instructions-call_ref.wast b/test/lit/passes/optimize-instructions-call_ref.wast
index 51d5cf020..a0da2e9e5 100644
--- a/test/lit/passes/optimize-instructions-call_ref.wast
+++ b/test/lit/passes/optimize-instructions-call_ref.wast
@@ -16,8 +16,8 @@
;; CHECK: (type $i32_=>_none (func (param i32)))
- ;; CHECK: (type $data_=>_none (func (param (ref data))))
- (type $data_=>_none (func (param (ref data))))
+ ;; CHECK: (type $struct_=>_none (func (param (ref data))))
+ (type $struct_=>_none (func (param (ref struct))))
;; CHECK: (type $i32_i32_i32_ref|$i32_i32_=>_none|_=>_none (func (param i32 i32 i32 (ref $i32_i32_=>_none))))
@@ -124,7 +124,7 @@
)
)
- ;; CHECK: (func $fallthrough-non-nullable (type $data_=>_none) (param $x (ref data))
+ ;; CHECK: (func $fallthrough-non-nullable (type $struct_=>_none) (param $x (ref data))
;; CHECK-NEXT: (local $1 dataref)
;; CHECK-NEXT: (call $fallthrough-non-nullable
;; CHECK-NEXT: (block (result (ref data))
@@ -132,7 +132,7 @@
;; CHECK-NEXT: (local.get $x)
;; CHECK-NEXT: )
;; CHECK-NEXT: (drop
- ;; CHECK-NEXT: (block (result (ref $data_=>_none))
+ ;; CHECK-NEXT: (block (result (ref $struct_=>_none))
;; CHECK-NEXT: (nop)
;; CHECK-NEXT: (ref.func $fallthrough-non-nullable)
;; CHECK-NEXT: )
@@ -143,14 +143,14 @@
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
- (func $fallthrough-non-nullable (param $x (ref data))
+ (func $fallthrough-non-nullable (param $x (ref struct))
;; A fallthrough appears here, and in addition the last operand is non-
;; nullable, which means we must be careful when we create a temp local for
;; it: the local should be nullable, and gets of it should use a
;; ref.as_non_null so that we validate.
- (call_ref $data_=>_none
+ (call_ref $struct_=>_none
(local.get $x)
- (block (result (ref $data_=>_none))
+ (block (result (ref $struct_=>_none))
(nop)
(ref.func $fallthrough-non-nullable)
)