summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/exception-handling.wast.fromBinary22
-rw-r--r--test/exception-handling.wast.fromBinary.noDebugInfo22
-rw-r--r--test/passes/remove-unused-module-elements_all-features.txt24
-rw-r--r--test/passes/remove-unused-module-elements_all-features.wast16
4 files changed, 64 insertions, 20 deletions
diff --git a/test/exception-handling.wast.fromBinary b/test/exception-handling.wast.fromBinary
index 3151d1ea8..2317f4c42 100644
--- a/test/exception-handling.wast.fromBinary
+++ b/test/exception-handling.wast.fromBinary
@@ -44,7 +44,27 @@
)
)
)
- (unreachable)
+ (try
+ (nop)
+ (catch
+ (drop
+ (exnref.pop)
+ )
+ )
+ )
+ (try
+ (block
+ (call $foo)
+ (call $bar)
+ )
+ (catch
+ (drop
+ (exnref.pop)
+ )
+ (call $foo)
+ (call $bar)
+ )
+ )
)
)
diff --git a/test/exception-handling.wast.fromBinary.noDebugInfo b/test/exception-handling.wast.fromBinary.noDebugInfo
index 3ef95033c..fca25f7d5 100644
--- a/test/exception-handling.wast.fromBinary.noDebugInfo
+++ b/test/exception-handling.wast.fromBinary.noDebugInfo
@@ -44,7 +44,27 @@
)
)
)
- (unreachable)
+ (try
+ (nop)
+ (catch
+ (drop
+ (exnref.pop)
+ )
+ )
+ )
+ (try
+ (block
+ (call $1)
+ (call $2)
+ )
+ (catch
+ (drop
+ (exnref.pop)
+ )
+ (call $1)
+ (call $2)
+ )
+ )
)
)
diff --git a/test/passes/remove-unused-module-elements_all-features.txt b/test/passes/remove-unused-module-elements_all-features.txt
index 92216271f..87e21a012 100644
--- a/test/passes/remove-unused-module-elements_all-features.txt
+++ b/test/passes/remove-unused-module-elements_all-features.txt
@@ -289,18 +289,20 @@
(start $start)
(func $start (; 0 ;) (type $FUNCSIG$v)
(local $exn exnref)
- (throw $e-throw
- (i32.const 0)
- )
- (block
- (local.set $exn
- (exnref.pop)
+ (try
+ (throw $e-throw
+ (i32.const 0)
)
- (drop
- (block $l0 (result i32)
- (rethrow
- (br_on_exn $l0 $e-bronexn
- (local.get $exn)
+ (catch
+ (local.set $exn
+ (exnref.pop)
+ )
+ (drop
+ (block $l0 (result i32)
+ (rethrow
+ (br_on_exn $l0 $e-bronexn
+ (local.get $exn)
+ )
)
)
)
diff --git a/test/passes/remove-unused-module-elements_all-features.wast b/test/passes/remove-unused-module-elements_all-features.wast
index 283e539fd..57d376d31 100644
--- a/test/passes/remove-unused-module-elements_all-features.wast
+++ b/test/passes/remove-unused-module-elements_all-features.wast
@@ -271,13 +271,15 @@
(import "env" "e" (event $e-import (attr 0) (param i32)))
(start $start)
(func $start (local $exn exnref) (; 0 ;)
- (throw $e-throw (i32.const 0))
- (catch
- (local.set $exn (exnref.pop))
- (drop
- (block $l0 (result i32)
- (rethrow
- (br_on_exn $l0 $e-bronexn (local.get $exn))
+ (try
+ (throw $e-throw (i32.const 0))
+ (catch
+ (local.set $exn (exnref.pop))
+ (drop
+ (block $l0 (result i32)
+ (rethrow
+ (br_on_exn $l0 $e-bronexn (local.get $exn))
+ )
)
)
)