summaryrefslogtreecommitdiff
path: root/test/exception-handling.wast.fromBinary
diff options
context:
space:
mode:
Diffstat (limited to 'test/exception-handling.wast.fromBinary')
-rw-r--r--test/exception-handling.wast.fromBinary137
1 files changed, 117 insertions, 20 deletions
diff --git a/test/exception-handling.wast.fromBinary b/test/exception-handling.wast.fromBinary
index 4e1895593..292827970 100644
--- a/test/exception-handling.wast.fromBinary
+++ b/test/exception-handling.wast.fromBinary
@@ -1,10 +1,12 @@
(module
(type $none_=>_none (func))
(type $i32_=>_none (func (param i32)))
- (type $externref_=>_none (func (param externref)))
+ (type $i64_=>_none (func (param i64)))
+ (type $i32_i64_=>_none (func (param i32 i64)))
(type $exnref_=>_exnref (func (param exnref) (result exnref)))
(event $event$0 (attr 0) (param i32))
- (event $event$1 (attr 0) (param externref))
+ (event $event$1 (attr 0) (param i64))
+ (event $event$2 (attr 0) (param i32 i64))
(func $exnref_test (param $0 exnref) (result exnref)
(local.get $0)
)
@@ -15,38 +17,72 @@
(nop)
)
(func $eh_test
- (local $exn exnref)
+ (local $x i32)
+ (local $1 i64)
+ (local $2 (i32 i64))
+ (local $3 i32)
+ (local $4 i32)
(try
(do
(throw $event$0
(i32.const 0)
)
)
- (catch
- (local.set $exn
- (pop exnref)
- )
+ (catch $event$0
(drop
- (block $label$3 (result i32)
- (rethrow
- (br_on_exn $label$3 $event$0
- (local.get $exn)
+ (pop i32)
+ )
+ )
+ )
+ (try
+ (do
+ (throw $event$2
+ (i32.const 0)
+ (i64.const 0)
+ )
+ )
+ (catch $event$2
+ (local.set $2
+ (pop i32 i64)
+ )
+ (local.set $x
+ (block (result i32)
+ (local.set $3
+ (tuple.extract 0
+ (local.get $2)
+ )
+ )
+ (local.set $1
+ (tuple.extract 1
+ (local.get $2)
)
)
+ (local.get $3)
+ )
+ )
+ (drop
+ (block (result i32)
+ (local.set $4
+ (local.get $x)
+ )
+ (drop
+ (local.get $1)
+ )
+ (local.get $4)
)
)
)
)
- (block $label$4
+ (block $label$5
(try
(do
- (br $label$4)
+ (br $label$5)
)
- (catch
+ (catch $event$0
(drop
- (pop exnref)
+ (pop i32)
)
- (br $label$4)
+ (br $label$5)
)
)
)
@@ -54,9 +90,9 @@
(do
(nop)
)
- (catch
+ (catch $event$0
(drop
- (pop exnref)
+ (pop i32)
)
)
)
@@ -65,14 +101,75 @@
(call $foo)
(call $bar)
)
- (catch
+ (catch $event$0
(drop
- (pop exnref)
+ (pop i32)
)
(call $foo)
(call $bar)
)
)
+ (try
+ (do
+ (throw $event$0
+ (i32.const 0)
+ )
+ )
+ (catch $event$0
+ (drop
+ (pop i32)
+ )
+ )
+ (catch $event$1
+ (drop
+ (pop i64)
+ )
+ )
+ )
+ (try
+ (do
+ (throw $event$0
+ (i32.const 0)
+ )
+ )
+ (catch_all
+ (nop)
+ )
+ )
+ (try
+ (do
+ (throw $event$0
+ (i32.const 0)
+ )
+ )
+ (catch $event$0
+ (drop
+ (pop i32)
+ )
+ )
+ (catch $event$1
+ (drop
+ (pop i64)
+ )
+ )
+ (catch_all
+ (call $foo)
+ (call $bar)
+ )
+ )
+ (try
+ (do
+ (throw $event$0
+ (i32.const 0)
+ )
+ )
+ (catch $event$0
+ (drop
+ (pop i32)
+ )
+ (rethrow 0)
+ )
+ )
)
)