From 3d9dd361a2d7f5d3a26d0c95ea9f7c6cdd502ceb Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Fri, 4 Dec 2015 14:31:23 -0800 Subject: use a br_if on do-while loops --- src/asm2wasm.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/asm2wasm.h b/src/asm2wasm.h index 7785ece5a..27f7edffb 100644 --- a/src/asm2wasm.h +++ b/src/asm2wasm.h @@ -1333,11 +1333,9 @@ Function* Asm2WasmBuilder::processFunction(Ref ast) { breakStack.pop_back(); Break *continuer = allocator.alloc(); continuer->name = in; - If *condition = allocator.alloc(); - condition->condition = process(ast[1]); - condition->ifTrue = continuer; + continuer->condition = process(ast[1]); Block *block = blockify(ret->body); - block->list.push_back(condition); + block->list.push_back(continuer); ret->body = block; return ret; } else if (what == LABEL) { -- cgit v1.2.3