summaryrefslogtreecommitdiff
path: root/test/reference-types.wast.fromBinary
diff options
context:
space:
mode:
Diffstat (limited to 'test/reference-types.wast.fromBinary')
-rw-r--r--test/reference-types.wast.fromBinary391
1 files changed, 29 insertions, 362 deletions
diff --git a/test/reference-types.wast.fromBinary b/test/reference-types.wast.fromBinary
index 50d403caf..ae54cfcd8 100644
--- a/test/reference-types.wast.fromBinary
+++ b/test/reference-types.wast.fromBinary
@@ -4,25 +4,21 @@
(type $funcref_=>_none (func (param funcref)))
(type $none_=>_funcref (func (result funcref)))
(type $externref_=>_none (func (param externref)))
- (type $exnref_=>_none (func (param exnref)))
(type $none_=>_externref (func (result externref)))
- (type $none_=>_exnref (func (result exnref)))
(type $none_=>_none (func))
(type $i32_=>_none (func (param i32)))
(type $externref_=>_funcref (func (param externref) (result funcref)))
(import "env" "import_global" (global $import_global externref))
(import "env" "import_func" (func $import_func (param externref) (result funcref)))
- (table $0 4 4 funcref)
- (elem (i32.const 0) $take_externref $take_funcref $take_exnref $take_anyref)
+ (table $0 3 3 funcref)
+ (elem (i32.const 0) $take_externref $take_funcref $take_anyref)
(global $global_externref (mut externref) (ref.null extern))
(global $global_funcref (mut funcref) (ref.null func))
(global $global_funcref_func (mut funcref) (ref.func $foo))
- (global $global_exnref (mut exnref) (ref.null exn))
(global $global_anyref (mut anyref) (ref.null any))
(global $global_anyref2 (mut anyref) (ref.null extern))
(global $global_anyref3 (mut anyref) (ref.null func))
(global $global_anyref4 (mut anyref) (ref.func $foo))
- (global $global_anyref5 (mut anyref) (ref.null exn))
(event $event$0 (attr 0) (param i32))
(export "export_func" (func $import_func))
(export "export_global" (global $import_global))
@@ -32,9 +28,6 @@
(func $take_funcref (param $0 funcref)
(nop)
)
- (func $take_exnref (param $0 exnref)
- (nop)
- )
(func $take_anyref (param $0 anyref)
(nop)
)
@@ -44,7 +37,6 @@
(func $test
(local $local_externref funcref)
(local $local_funcref externref)
- (local $local_exnref exnref)
(local $local_anyref anyref)
(local.set $local_funcref
(local.get $local_funcref)
@@ -67,15 +59,6 @@
(local.set $local_externref
(ref.func $foo)
)
- (local.set $local_exnref
- (local.get $local_exnref)
- )
- (local.set $local_exnref
- (global.get $global_exnref)
- )
- (local.set $local_exnref
- (ref.null exn)
- )
(local.set $local_anyref
(local.get $local_anyref)
)
@@ -106,15 +89,6 @@
(local.set $local_anyref
(ref.func $foo)
)
- (local.set $local_anyref
- (local.get $local_exnref)
- )
- (local.set $local_anyref
- (global.get $global_exnref)
- )
- (local.set $local_anyref
- (ref.null exn)
- )
(global.set $global_externref
(global.get $global_externref)
)
@@ -136,15 +110,6 @@
(global.set $global_funcref
(ref.func $foo)
)
- (global.set $global_exnref
- (global.get $global_exnref)
- )
- (global.set $global_exnref
- (local.get $local_exnref)
- )
- (global.set $global_exnref
- (ref.null exn)
- )
(global.set $global_anyref
(global.get $global_anyref)
)
@@ -175,15 +140,6 @@
(global.set $global_anyref
(ref.func $foo)
)
- (global.set $global_anyref
- (global.get $global_exnref)
- )
- (global.set $global_anyref
- (local.get $local_exnref)
- )
- (global.set $global_anyref
- (ref.null exn)
- )
(call $take_externref
(local.get $local_funcref)
)
@@ -205,15 +161,6 @@
(call $take_funcref
(ref.func $foo)
)
- (call $take_exnref
- (local.get $local_exnref)
- )
- (call $take_exnref
- (global.get $global_exnref)
- )
- (call $take_exnref
- (ref.null exn)
- )
(call $take_anyref
(local.get $local_anyref)
)
@@ -244,15 +191,6 @@
(call $take_anyref
(ref.func $foo)
)
- (call $take_anyref
- (local.get $local_exnref)
- )
- (call $take_anyref
- (global.get $global_exnref)
- )
- (call $take_anyref
- (ref.null exn)
- )
(call_indirect (type $externref_=>_none)
(local.get $local_funcref)
(i32.const 0)
@@ -281,18 +219,6 @@
(ref.func $foo)
(i32.const 1)
)
- (call_indirect (type $exnref_=>_none)
- (local.get $local_exnref)
- (i32.const 2)
- )
- (call_indirect (type $exnref_=>_none)
- (global.get $global_exnref)
- (i32.const 2)
- )
- (call_indirect (type $exnref_=>_none)
- (ref.null exn)
- (i32.const 2)
- )
(call_indirect (type $anyref_=>_none)
(local.get $local_anyref)
(i32.const 3)
@@ -333,18 +259,6 @@
(ref.func $foo)
(i32.const 3)
)
- (call_indirect (type $anyref_=>_none)
- (local.get $local_exnref)
- (i32.const 3)
- )
- (call_indirect (type $anyref_=>_none)
- (global.get $global_exnref)
- (i32.const 3)
- )
- (call_indirect (type $anyref_=>_none)
- (ref.null exn)
- (i32.const 3)
- )
(drop
(block $label$1 (result externref)
(br_if $label$1
@@ -402,25 +316,25 @@
)
)
(drop
- (block $label$8 (result exnref)
+ (block $label$8 (result anyref)
(br_if $label$8
- (local.get $local_exnref)
+ (local.get $local_anyref)
(i32.const 1)
)
)
)
(drop
- (block $label$9 (result exnref)
+ (block $label$9 (result anyref)
(br_if $label$9
- (global.get $global_exnref)
+ (global.get $global_anyref)
(i32.const 1)
)
)
)
(drop
- (block $label$10 (result exnref)
+ (block $label$10 (result anyref)
(br_if $label$10
- (ref.null exn)
+ (ref.null any)
(i32.const 1)
)
)
@@ -428,7 +342,7 @@
(drop
(block $label$11 (result anyref)
(br_if $label$11
- (local.get $local_anyref)
+ (local.get $local_funcref)
(i32.const 1)
)
)
@@ -436,7 +350,7 @@
(drop
(block $label$12 (result anyref)
(br_if $label$12
- (global.get $global_anyref)
+ (local.get $local_externref)
(i32.const 1)
)
)
@@ -444,7 +358,7 @@
(drop
(block $label$13 (result anyref)
(br_if $label$13
- (ref.null any)
+ (ref.null extern)
(i32.const 1)
)
)
@@ -452,7 +366,7 @@
(drop
(block $label$14 (result anyref)
(br_if $label$14
- (local.get $local_funcref)
+ (ref.null func)
(i32.const 1)
)
)
@@ -460,167 +374,97 @@
(drop
(block $label$15 (result anyref)
(br_if $label$15
- (local.get $local_externref)
- (i32.const 1)
- )
- )
- )
- (drop
- (block $label$16 (result anyref)
- (br_if $label$16
- (local.get $local_exnref)
- (i32.const 1)
- )
- )
- )
- (drop
- (block $label$17 (result anyref)
- (br_if $label$17
- (ref.null extern)
- (i32.const 1)
- )
- )
- )
- (drop
- (block $label$18 (result anyref)
- (br_if $label$18
- (ref.null func)
- (i32.const 1)
- )
- )
- )
- (drop
- (block $label$19 (result anyref)
- (br_if $label$19
(ref.func $foo)
(i32.const 1)
)
)
)
(drop
- (block $label$20 (result anyref)
- (br_if $label$20
- (ref.null exn)
- (i32.const 1)
- )
- )
- )
- (drop
- (loop $label$21 (result externref)
+ (loop $label$16 (result externref)
(local.get $local_funcref)
)
)
(drop
- (loop $label$22 (result externref)
+ (loop $label$17 (result externref)
(global.get $global_externref)
)
)
(drop
- (loop $label$23 (result externref)
+ (loop $label$18 (result externref)
(ref.null extern)
)
)
(drop
- (loop $label$24 (result funcref)
+ (loop $label$19 (result funcref)
(local.get $local_externref)
)
)
(drop
- (loop $label$25 (result funcref)
+ (loop $label$20 (result funcref)
(global.get $global_funcref)
)
)
(drop
- (loop $label$26 (result funcref)
+ (loop $label$21 (result funcref)
(ref.null func)
)
)
(drop
- (loop $label$27 (result funcref)
+ (loop $label$22 (result funcref)
(ref.func $foo)
)
)
(drop
- (loop $label$28 (result exnref)
- (local.get $local_exnref)
- )
- )
- (drop
- (loop $label$29 (result exnref)
- (global.get $global_exnref)
- )
- )
- (drop
- (loop $label$30 (result exnref)
- (ref.null exn)
- )
- )
- (drop
- (loop $label$31 (result anyref)
+ (loop $label$23 (result anyref)
(local.get $local_anyref)
)
)
(drop
- (loop $label$32 (result anyref)
+ (loop $label$24 (result anyref)
(global.get $global_anyref)
)
)
(drop
- (loop $label$33 (result anyref)
+ (loop $label$25 (result anyref)
(ref.null any)
)
)
(drop
- (loop $label$34 (result anyref)
+ (loop $label$26 (result anyref)
(local.get $local_funcref)
)
)
(drop
- (loop $label$35 (result anyref)
+ (loop $label$27 (result anyref)
(global.get $global_externref)
)
)
(drop
- (loop $label$36 (result anyref)
+ (loop $label$28 (result anyref)
(ref.null extern)
)
)
(drop
- (loop $label$37 (result anyref)
+ (loop $label$29 (result anyref)
(local.get $local_externref)
)
)
(drop
- (loop $label$38 (result anyref)
+ (loop $label$30 (result anyref)
(global.get $global_funcref)
)
)
(drop
- (loop $label$39 (result anyref)
+ (loop $label$31 (result anyref)
(ref.null func)
)
)
(drop
- (loop $label$40 (result anyref)
+ (loop $label$32 (result anyref)
(ref.func $foo)
)
)
(drop
- (loop $label$41 (result anyref)
- (local.get $local_exnref)
- )
- )
- (drop
- (loop $label$42 (result anyref)
- (global.get $global_exnref)
- )
- )
- (drop
- (loop $label$43 (result anyref)
- (ref.null exn)
- )
- )
- (drop
(if (result externref)
(i32.const 1)
(local.get $local_funcref)
@@ -635,13 +479,6 @@
)
)
(drop
- (if (result exnref)
- (i32.const 1)
- (local.get $local_exnref)
- (ref.null exn)
- )
- )
- (drop
(if (result anyref)
(i32.const 1)
(local.get $local_anyref)
@@ -658,20 +495,6 @@
(drop
(if (result anyref)
(i32.const 1)
- (local.get $local_funcref)
- (local.get $local_exnref)
- )
- )
- (drop
- (if (result anyref)
- (i32.const 1)
- (local.get $local_externref)
- (local.get $local_exnref)
- )
- )
- (drop
- (if (result anyref)
- (i32.const 1)
(ref.null extern)
(ref.null func)
)
@@ -679,20 +502,6 @@
(drop
(if (result anyref)
(i32.const 1)
- (ref.null extern)
- (ref.null exn)
- )
- )
- (drop
- (if (result anyref)
- (i32.const 1)
- (ref.null func)
- (ref.null exn)
- )
- )
- (drop
- (if (result anyref)
- (i32.const 1)
(ref.func $foo)
(ref.null extern)
)
@@ -724,19 +533,6 @@
)
)
(drop
- (try (result exnref)
- (do
- (ref.null exn)
- )
- (catch $event$0
- (drop
- (pop i32)
- )
- (ref.null exn)
- )
- )
- )
- (drop
(try (result anyref)
(do
(local.get $local_funcref)
@@ -752,19 +548,6 @@
(drop
(try (result anyref)
(do
- (local.get $local_funcref)
- )
- (catch $event$0
- (drop
- (pop i32)
- )
- (local.get $local_exnref)
- )
- )
- )
- (drop
- (try (result anyref)
- (do
(ref.func $foo)
)
(catch $event$0
@@ -776,45 +559,6 @@
)
)
(drop
- (try (result anyref)
- (do
- (ref.func $foo)
- )
- (catch $event$0
- (drop
- (pop i32)
- )
- (local.get $local_exnref)
- )
- )
- )
- (drop
- (try (result anyref)
- (do
- (ref.null exn)
- )
- (catch $event$0
- (drop
- (pop i32)
- )
- (local.get $local_funcref)
- )
- )
- )
- (drop
- (try (result anyref)
- (do
- (ref.null exn)
- )
- (catch $event$0
- (drop
- (pop i32)
- )
- (ref.func $foo)
- )
- )
- )
- (drop
(select (result externref)
(local.get $local_funcref)
(ref.null extern)
@@ -829,13 +573,6 @@
)
)
(drop
- (select (result exnref)
- (local.get $local_exnref)
- (ref.null exn)
- (i32.const 1)
- )
- )
- (drop
(select
(i32.const 0)
(i32.const 2)
@@ -851,40 +588,12 @@
)
(drop
(select (result anyref)
- (local.get $local_funcref)
- (local.get $local_exnref)
- (i32.const 1)
- )
- )
- (drop
- (select (result anyref)
(local.get $local_externref)
(local.get $local_funcref)
(i32.const 1)
)
)
(drop
- (select (result anyref)
- (local.get $local_externref)
- (local.get $local_exnref)
- (i32.const 1)
- )
- )
- (drop
- (select (result anyref)
- (local.get $local_exnref)
- (local.get $local_funcref)
- (i32.const 1)
- )
- )
- (drop
- (select (result anyref)
- (local.get $local_exnref)
- (local.get $local_externref)
- (i32.const 1)
- )
- )
- (drop
(ref.is_null
(local.get $local_funcref)
)
@@ -921,21 +630,6 @@
)
(drop
(ref.is_null
- (local.get $local_exnref)
- )
- )
- (drop
- (ref.is_null
- (global.get $global_exnref)
- )
- )
- (drop
- (ref.is_null
- (ref.null exn)
- )
- )
- (drop
- (ref.is_null
(local.get $local_anyref)
)
)
@@ -973,16 +667,6 @@
(func $return_funcref_func (result funcref)
(ref.func $foo)
)
- (func $return_exnref_local (result exnref)
- (local $local_exnref exnref)
- (local.get $local_exnref)
- )
- (func $return_exnref_global (result exnref)
- (global.get $global_exnref)
- )
- (func $return_exnref_null (result exnref)
- (ref.null exn)
- )
(func $return_anyref_local (result anyref)
(local $local_anyref anyref)
(local.get $local_anyref)
@@ -1016,16 +700,6 @@
(func $return_anyref8 (result anyref)
(ref.func $foo)
)
- (func $return_anyref9 (result anyref)
- (local $local_exnref exnref)
- (local.get $local_exnref)
- )
- (func $return_anyref10 (result anyref)
- (global.get $global_exnref)
- )
- (func $return_anyref11 (result anyref)
- (ref.null exn)
- )
(func $returns_externref (result externref)
(local $local_externref externref)
(return
@@ -1038,12 +712,6 @@
(local.get $local_funcref)
)
)
- (func $returns_exnref (result exnref)
- (local $local_exnref exnref)
- (return
- (local.get $local_exnref)
- )
- )
(func $returns_anyref (result anyref)
(local $local_anyref anyref)
(return
@@ -1053,7 +721,6 @@
(func $returns_anyref2 (result anyref)
(local $local_externref funcref)
(local $local_funcref externref)
- (local $local_exnref exnref)
(return
(local.get $local_funcref)
)