From ef4553db21e7e93fb82b375df4d32feb7f3f5915 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Fri, 4 Dec 2015 16:27:22 -0800 Subject: more statements --- src/wasm2asm.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src') 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); -- cgit v1.2.3