summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/wasm2asm.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/wasm2asm.h b/src/wasm2asm.h
index e26652963..722eb56eb 100644
--- a/src/wasm2asm.h
+++ b/src/wasm2asm.h
@@ -156,9 +156,11 @@ Ref Wasm2AsmBuilder::processFunction(Function* func) {
IString name = fromName(param.name);
ValueBuilder::appendArgumentToFunction(ret, name);
ret[3]->push_back(
- ValueBuilder::makeAssign(
- ValueBuilder::makeName(name),
- makeAsmCoercion(ValueBuilder::makeName(name), wasmToAsmType(param.type))
+ ValueBuilder::makeStatement(
+ ValueBuilder::makeAssign(
+ ValueBuilder::makeName(name),
+ makeAsmCoercion(ValueBuilder::makeName(name), wasmToAsmType(param.type))
+ )
)
);
}
@@ -432,7 +434,7 @@ Ref Wasm2AsmBuilder::processFunctionBody(Expression* curr, IString result) {
size_t size = curr->list.size();
for (size_t i = 0; i < size; i++) {
// TODO: flatten out, if we receive a block, just insert the elements
- ret[1]->push_back(visit(curr->list[i], i < size-1 ? NO_RESULT : result));
+ ret[1]->push_back(ValueBuilder::makeStatement(visit(curr->list[i], i < size-1 ? NO_RESULT : result)));
}
if (curr->name.is()) {
ret = ValueBuilder::makeLabel(fromName(curr->name), ret);