summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/wasm/wasm-binary.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/wasm/wasm-binary.cpp b/src/wasm/wasm-binary.cpp
index 1b82f5760..bf29f948b 100644
--- a/src/wasm/wasm-binary.cpp
+++ b/src/wasm/wasm-binary.cpp
@@ -2611,6 +2611,7 @@ void WasmBinaryBuilder::pushExpression(Expression* curr) {
}
}
auto nullableType = Type(Tuple(finalTypes));
+ requireFunctionContext("pushExpression-tuple");
Index tuple = builder.addVar(currFunction, nullableType);
expressionStack.push_back(builder.makeLocalSet(tuple, curr));
for (Index i = 0; i < nullableType.size(); ++i) {
@@ -3740,6 +3741,7 @@ BinaryConsts::ASTNodes WasmBinaryBuilder::readExpression(Expression*& curr) {
}
if (curr) {
if (currDebugLocation.size()) {
+ requireFunctionContext("debugLocation");
currFunction->debugLocations[curr] = *currDebugLocation.begin();
}
if (DWARF && currFunction) {
@@ -3846,6 +3848,7 @@ void WasmBinaryBuilder::visitBlock(Block* curr) {
startControlFlow(curr);
pos++;
if (debugLocation.size()) {
+ requireFunctionContext("block-debugLocation");
currFunction->debugLocations[curr] = *debugLocation.begin();
}
continue;
@@ -6533,6 +6536,7 @@ void WasmBinaryBuilder::visitLet(Block* curr) {
curr->type = getType();
// Get the new local types. First, get the absolute index from which we will
// start to allocate them.
+ requireFunctionContext("let");
Index absoluteStart = currFunction->vars.size();
readVars();
Index numNewVars = currFunction->vars.size() - absoluteStart;