summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/wasm-interpreter.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/wasm-interpreter.h b/src/wasm-interpreter.h
index fe84da315..99c3d6d88 100644
--- a/src/wasm-interpreter.h
+++ b/src/wasm-interpreter.h
@@ -306,6 +306,7 @@ private:
Flow flow = visit(curr->value);
if (flow.breaking()) return flow;
NOTE_EVAL1(flow.value);
+ assert(flow.value.type == curr->type);
scope.locals[name] = flow.value;
return flow;
}
@@ -406,6 +407,8 @@ private:
if (flow.breaking()) return flow;
Literal right = flow.value;
NOTE_EVAL2(left, right);
+ assert(left.type == curr->left->type);
+ assert(right.type == curr->right->type);
if (left.type == i32) {
int32_t l = left.geti32(), r = right.geti32();
switch (curr->op) {