summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorHeejin Ahn <aheejin@gmail.com>2021-02-03 03:09:18 +0900
committerGitHub <noreply@github.com>2021-02-03 03:09:18 +0900
commitcf51ca4f3b727e7efcfc043bb8120ed2c766285d (patch)
tree6135e1a2d7ad776157e92c24700c1883b6c81171 /test
parentabbe4f7bf4512f52e4fc0ed969a91d7337540ac4 (diff)
downloadbinaryen-cf51ca4f3b727e7efcfc043bb8120ed2c766285d.tar.gz
binaryen-cf51ca4f3b727e7efcfc043bb8120ed2c766285d.tar.bz2
binaryen-cf51ca4f3b727e7efcfc043bb8120ed2c766285d.zip
Support Stack IR for new try-catch(_all) (#3538)
This adds missing stack IR printing support for the new form of try-catch-catch_all. Also uses `printMedium` when printing instructions consistently.
Diffstat (limited to 'test')
-rw-r--r--test/passes/generate-stack-ir_optimize-stack-ir_print-stack-ir_all-features.txt7
-rw-r--r--test/passes/generate-stack-ir_optimize-stack-ir_print-stack-ir_all-features.wast3
2 files changed, 9 insertions, 1 deletions
diff --git a/test/passes/generate-stack-ir_optimize-stack-ir_print-stack-ir_all-features.txt b/test/passes/generate-stack-ir_optimize-stack-ir_print-stack-ir_all-features.txt
index fb9e2907b..ffb2da5be 100644
--- a/test/passes/generate-stack-ir_optimize-stack-ir_print-stack-ir_all-features.txt
+++ b/test/passes/generate-stack-ir_optimize-stack-ir_print-stack-ir_all-features.txt
@@ -6,10 +6,12 @@
try
i32.const 0
throw $e0
- catch
+ catch $e0
drop
rethrow 0
+ catch_all
+ rethrow 0
end
unreachable
)
@@ -31,6 +33,9 @@
)
(rethrow 0)
)
+ (catch_all
+ (rethrow 0)
+ )
)
)
)
diff --git a/test/passes/generate-stack-ir_optimize-stack-ir_print-stack-ir_all-features.wast b/test/passes/generate-stack-ir_optimize-stack-ir_print-stack-ir_all-features.wast
index 7dbb4aa72..047d9c126 100644
--- a/test/passes/generate-stack-ir_optimize-stack-ir_print-stack-ir_all-features.wast
+++ b/test/passes/generate-stack-ir_optimize-stack-ir_print-stack-ir_all-features.wast
@@ -10,6 +10,9 @@
(drop (pop i32))
(rethrow 0)
)
+ (catch_all
+ (rethrow 0)
+ )
)
)
)