summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2015-12-04 16:27:22 -0800
committerAlon Zakai <alonzakai@gmail.com>2015-12-04 16:27:22 -0800
commitef4553db21e7e93fb82b375df4d32feb7f3f5915 (patch)
treec9a297e38dace59b12d9124ea9bb17138b9374b2
parentf646dbde5e485c88dd904b95d962e1b8674395d5 (diff)
downloadbinaryen-ef4553db21e7e93fb82b375df4d32feb7f3f5915.tar.gz
binaryen-ef4553db21e7e93fb82b375df4d32feb7f3f5915.tar.bz2
binaryen-ef4553db21e7e93fb82b375df4d32feb7f3f5915.zip
more statements
-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);