summaryrefslogtreecommitdiff
path: root/src/wasm/wasm-stack.cpp
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 /src/wasm/wasm-stack.cpp
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 'src/wasm/wasm-stack.cpp')
-rw-r--r--src/wasm/wasm-stack.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/wasm/wasm-stack.cpp b/src/wasm/wasm-stack.cpp
index cb8702d0c..95cb4a44c 100644
--- a/src/wasm/wasm-stack.cpp
+++ b/src/wasm/wasm-stack.cpp
@@ -2316,6 +2316,10 @@ void StackIRToBinaryWriter::write() {
writer.emitCatch(inst->origin->cast<Try>(), catchIndexStack.back()++);
break;
}
+ case StackInst::CatchAll: {
+ writer.emitCatchAll(inst->origin->cast<Try>());
+ break;
+ }
default:
WASM_UNREACHABLE("unexpected op");
}