summaryrefslogtreecommitdiff
path: root/test/passes/remove-unused-names_code-folding_all-features.wast
diff options
context:
space:
mode:
Diffstat (limited to 'test/passes/remove-unused-names_code-folding_all-features.wast')
-rw-r--r--test/passes/remove-unused-names_code-folding_all-features.wast30
1 files changed, 14 insertions, 16 deletions
diff --git a/test/passes/remove-unused-names_code-folding_all-features.wast b/test/passes/remove-unused-names_code-folding_all-features.wast
index 823ed45eb..387b8600b 100644
--- a/test/passes/remove-unused-names_code-folding_all-features.wast
+++ b/test/passes/remove-unused-names_code-folding_all-features.wast
@@ -1192,15 +1192,15 @@
)
)
- (func $exnref_pop-test (local $exn exnref)
+ (event $e-i32 (attr 0) (param i32))
+ (func $pop-test
(try
(do
(try
(do)
- (catch
- ;; Expressions containing (pop exnref) should NOT be taken out and
- ;; folded.
- (local.set $exn (pop exnref))
+ (catch $e-i32
+ ;; Expressions containing a pop should NOT be taken out and folded.
+ (drop (pop i32))
(drop (i32.const 111))
(drop (i32.const 222))
(drop (i32.const 333))
@@ -1208,8 +1208,8 @@
)
)
)
- (catch
- (local.set $exn (pop exnref))
+ (catch $e-i32
+ (drop (pop i32))
(drop (i32.const 111))
(drop (i32.const 222))
(drop (i32.const 333))
@@ -1246,7 +1246,7 @@
)
(func $foo)
- (func $try-call-optimize-terminating-tails (result exnref)
+ (func $try-call-optimize-terminating-tails (result i32)
(try
(do
;; Expressions that can throw should NOT be taken out of 'try' scope.
@@ -1254,21 +1254,20 @@
(call $foo)
(call $foo)
(call $foo)
- (return (ref.null exn))
+ (return (i32.const 0))
)
- (catch
- (drop (pop exnref))
+ (catch_all
(call $foo)
(call $foo)
(call $foo)
(call $foo)
- (return (ref.null exn))
+ (return (i32.const 0))
)
)
- (ref.null exn)
+ (i32.const 0)
)
- (func $try-call-optimize-expression-tails (local $exn exnref)
+ (func $try-call-optimize-expression-tails
(block $x
(try
(do
@@ -1278,8 +1277,7 @@
(call $foo)
(br $x)
)
- (catch
- (local.set $exn (pop exnref))
+ (catch_all
(call $foo)
(call $foo)
(call $foo)