summaryrefslogtreecommitdiff
path: root/test/heap-types.wast.fromBinary.noDebugInfo
diff options
context:
space:
mode:
authorAlon Zakai <azakai@google.com>2021-06-02 13:24:22 -0700
committerGitHub <noreply@github.com>2021-06-02 13:24:22 -0700
commitd8f2ddd4d680b059c2daded7f57051bf21d77297 (patch)
tree11a1f5d1e2621152bdfcef385201b950c379f0c5 /test/heap-types.wast.fromBinary.noDebugInfo
parente40396003798678803f4091ac4132aefa3905d7a (diff)
downloadbinaryen-d8f2ddd4d680b059c2daded7f57051bf21d77297.tar.gz
binaryen-d8f2ddd4d680b059c2daded7f57051bf21d77297.tar.bz2
binaryen-d8f2ddd4d680b059c2daded7f57051bf21d77297.zip
[Wasm GC] Add negated BrOn* operations (#3913)
They are basically the flip versions. The only interesting part in the impl is that their returned typed and sent types are different. Spec: https://docs.google.com/document/d/1DklC3qVuOdLHSXB5UXghM_syCh-4cMinQ50ICiXnK3Q/edit
Diffstat (limited to 'test/heap-types.wast.fromBinary.noDebugInfo')
-rw-r--r--test/heap-types.wast.fromBinary.noDebugInfo55
1 files changed, 54 insertions, 1 deletions
diff --git a/test/heap-types.wast.fromBinary.noDebugInfo b/test/heap-types.wast.fromBinary.noDebugInfo
index 2fb57aacb..bb6ff9165 100644
--- a/test/heap-types.wast.fromBinary.noDebugInfo
+++ b/test/heap-types.wast.fromBinary.noDebugInfo
@@ -1,8 +1,8 @@
(module
(type ${i32_f32_f64} (struct (field i32) (field f32) (field f64)))
+ (type ${i8_mut:i16_ref|{i32_f32_f64}|_mut:ref|{i32_f32_f64}|} (struct (field i8) (field (mut i16)) (field (ref ${i32_f32_f64})) (field (mut (ref ${i32_f32_f64})))))
(type $[mut:f64] (array (mut f64)))
(type $none_=>_none (func))
- (type ${i8_mut:i16_ref|{i32_f32_f64}|_mut:ref|{i32_f32_f64}|} (struct (field i8) (field (mut i16)) (field (ref ${i32_f32_f64})) (field (mut (ref ${i32_f32_f64})))))
(type ${i32_i64} (struct (field i32) (field i64)))
(type $[mut:ref?|[mut:f64]|] (array (mut (ref null $[mut:f64]))))
(type ${mut:f32} (struct (field (mut f32))))
@@ -195,6 +195,7 @@
)
(func $4
(local $0 (ref null ${i32_f32_f64}))
+ (local $1 (ref null ${i8_mut:i16_ref|{i32_f32_f64}|_mut:ref|{i32_f32_f64}|}))
(drop
(ref.test
(ref.null ${i32_f32_f64})
@@ -223,6 +224,17 @@
)
)
)
+ (drop
+ (block $label$3 (result (ref null ${i32_f32_f64}))
+ (local.set $1
+ (br_on_cast_fail $label$3
+ (ref.null ${i32_f32_f64})
+ (rtt.canon ${i8_mut:i16_ref|{i32_f32_f64}|_mut:ref|{i32_f32_f64}|})
+ )
+ )
+ (ref.null ${i32_f32_f64})
+ )
+ )
)
(func $5 (param $0 anyref)
(if
@@ -269,6 +281,9 @@
(func $7 (param $0 anyref)
(local $1 anyref)
(local $2 anyref)
+ (local $3 funcref)
+ (local $4 (ref null data))
+ (local $5 (ref null i31))
(block $label$1
(local.set $2
(br_on_null $label$1
@@ -306,6 +321,44 @@
(ref.null i31)
)
)
+ (drop
+ (block $label$5 (result (ref any))
+ (br_on_non_null $label$5
+ (local.get $0)
+ )
+ (unreachable)
+ )
+ )
+ (drop
+ (block $label$6 (result anyref)
+ (local.set $3
+ (br_on_non_func $label$6
+ (local.get $0)
+ )
+ )
+ (ref.null any)
+ )
+ )
+ (drop
+ (block $label$7 (result anyref)
+ (local.set $4
+ (br_on_non_data $label$7
+ (local.get $0)
+ )
+ )
+ (ref.null any)
+ )
+ )
+ (drop
+ (block $label$8 (result anyref)
+ (local.set $5
+ (br_on_non_i31 $label$8
+ (local.get $0)
+ )
+ )
+ (ref.null any)
+ )
+ )
)
(func $8
(unreachable)