summaryrefslogtreecommitdiff
path: root/test/spec/exception-handling.wast
diff options
context:
space:
mode:
Diffstat (limited to 'test/spec/exception-handling.wast')
-rw-r--r--test/spec/exception-handling.wast42
1 files changed, 29 insertions, 13 deletions
diff --git a/test/spec/exception-handling.wast b/test/spec/exception-handling.wast
index d8ae48631..c3b80896e 100644
--- a/test/spec/exception-handling.wast
+++ b/test/spec/exception-handling.wast
@@ -17,7 +17,9 @@
(func (export "try_nothrow") (result i32)
(try (result i32)
- (i32.const 3)
+ (do
+ (i32.const 3)
+ )
(catch
(drop (exnref.pop))
(i32.const 0)
@@ -27,7 +29,9 @@
(func (export "try_throw_catch") (result i32)
(try (result i32)
- (throw $e-i32 (i32.const 5))
+ (do
+ (throw $e-i32 (i32.const 5))
+ )
(catch
(drop (exnref.pop))
(i32.const 3)
@@ -37,7 +41,7 @@
(func (export "try_call_catch") (result i32)
(try (result i32)
- (block
+ (do
(call $throw_single_value)
(unreachable)
)
@@ -50,7 +54,9 @@
(func (export "try_throw_rethrow")
(try
- (throw $e-i32 (i32.const 5))
+ (do
+ (throw $e-i32 (i32.const 5))
+ )
(catch
(rethrow (exnref.pop))
)
@@ -59,7 +65,9 @@
(func $try_call_rethrow (export "try_call_rethrow")
(try
- (call $throw_single_value)
+ (do
+ (call $throw_single_value)
+ )
(catch
(rethrow (exnref.pop))
)
@@ -77,7 +85,9 @@
(func (export "br_on_exn_match_no_value") (local $exn exnref)
(try
- (throw $e-v)
+ (do
+ (throw $e-v)
+ )
(catch
(local.set $exn (exnref.pop))
(block $l0
@@ -91,7 +101,9 @@
(func (export "br_on_exn_match_single_value") (result i32) (local $exn exnref)
(try (result i32)
- (throw $e-i32 (i32.const 5))
+ (do
+ (throw $e-i32 (i32.const 5))
+ )
(catch
(local.set $exn (exnref.pop))
(block $l0 (result i32)
@@ -106,7 +118,9 @@
(func (export "br_on_exn_match_multiple_values") (result i32 f32)
(local $exn exnref)
(try (result i32 f32)
- (throw $e-i32-f32 (i32.const 3) (f32.const 3.5))
+ (do
+ (throw $e-i32-f32 (i32.const 3) (f32.const 3.5))
+ )
(catch
(local.set $exn (exnref.pop))
(block $l0 (result i32 f32)
@@ -120,7 +134,9 @@
(func (export "br_on_exn_dont_match") (local $exn exnref)
(try
- (throw $e-i32 (i32.const 5))
+ (do
+ (throw $e-i32 (i32.const 5))
+ )
(catch
(local.set $exn (exnref.pop))
(block $l0
@@ -134,7 +150,7 @@
(func (export "call_br_on_exn") (result i32) (local $exn exnref)
(try (result i32)
- (block
+ (do
(call $throw_single_value)
(unreachable)
)
@@ -151,7 +167,7 @@
(func (export "call_rethrow_br_on_exn") (result i32) (local $exn exnref)
(try (result i32)
- (block
+ (do
(call $try_call_rethrow)
(unreachable)
)
@@ -186,7 +202,7 @@
(module
(func $f0
(try
- (nop)
+ (do (nop))
(catch (i32.const 0))
)
)
@@ -198,7 +214,7 @@
(module
(func $f0
(try
- (i32.const 0)
+ (do (i32.const 0))
(catch (i32.const 0))
)
)