summaryrefslogtreecommitdiff
path: root/src/wasm-builder.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/wasm-builder.h')
-rw-r--r--src/wasm-builder.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/wasm-builder.h b/src/wasm-builder.h
index a873a7309..0c3cec5c2 100644
--- a/src/wasm-builder.h
+++ b/src/wasm-builder.h
@@ -1197,6 +1197,21 @@ public:
return ret;
}
+ Resume* makeResume(HeapType contType,
+ const std::vector<Name>& handlerTags,
+ const std::vector<Name>& handlerBlocks,
+ const std::vector<Expression*>& operands,
+ Expression* cont) {
+ auto* ret = wasm.allocator.alloc<Resume>();
+ ret->contType = contType;
+ ret->handlerTags.set(handlerTags);
+ ret->handlerBlocks.set(handlerBlocks);
+ ret->operands.set(operands);
+ ret->cont = cont;
+ ret->finalize(&wasm);
+ return ret;
+ }
+
// Additional helpers
Drop* makeDrop(Expression* value) {