summaryrefslogtreecommitdiff
path: root/src/wasm-stack.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/wasm-stack.h')
-rw-r--r--src/wasm-stack.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/wasm-stack.h b/src/wasm-stack.h
index 1f66212ad..a195f1a84 100644
--- a/src/wasm-stack.h
+++ b/src/wasm-stack.h
@@ -170,6 +170,7 @@ public:
void visitIf(If* curr);
void visitLoop(Loop* curr);
void visitTry(Try* curr);
+ void visitTryTable(TryTable* curr);
protected:
Function* func = nullptr;
@@ -404,6 +405,16 @@ template<typename SubType> void BinaryenIRWriter<SubType>::visitTry(Try* curr) {
}
}
+template<typename SubType>
+void BinaryenIRWriter<SubType>::visitTryTable(TryTable* curr) {
+ emit(curr);
+ visitPossibleBlockContents(curr->body);
+ emitScopeEnd(curr);
+ if (curr->type == Type::unreachable) {
+ emitUnreachable();
+ }
+}
+
// Binaryen IR to binary writer
class BinaryenIRToBinaryWriter
: public BinaryenIRWriter<BinaryenIRToBinaryWriter> {