summaryrefslogtreecommitdiff
path: root/src/wasm/wasm-stack.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/wasm/wasm-stack.cpp')
-rw-r--r--src/wasm/wasm-stack.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/wasm/wasm-stack.cpp b/src/wasm/wasm-stack.cpp
index 3b14b3c35..6a2fd8468 100644
--- a/src/wasm/wasm-stack.cpp
+++ b/src/wasm/wasm-stack.cpp
@@ -2488,6 +2488,18 @@ void BinaryInstWriter::visitStringSliceIter(StringSliceIter* curr) {
<< U32LEB(BinaryConsts::StringViewIterSlice);
}
+void BinaryInstWriter::visitResume(Resume* curr) {
+ o << int8_t(BinaryConsts::Resume);
+ parent.writeIndexedHeapType(curr->contType);
+
+ size_t handlerNum = curr->handlerTags.size();
+ o << U32LEB(handlerNum);
+ for (size_t i = 0; i < handlerNum; i++) {
+ o << U32LEB(parent.getTagIndex(curr->handlerTags[i]))
+ << U32LEB(getBreakIndex(curr->handlerBlocks[i]));
+ }
+}
+
void BinaryInstWriter::emitScopeEnd(Expression* curr) {
assert(!breakStack.empty());
breakStack.pop_back();