From f75cf7fe9a70ec7041f758f061ac45deed18f4ab Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Wed, 17 Apr 2019 10:34:54 -0700 Subject: Fix if else JS printing when if body is a labelled block (#2017) Before, we'd print if (..) label: { .. }; else .. But that is wrong, as it ends the if too early. After this, we print if (..) label: { .. } else .. The bug was we checked if the if body was a block, but not if it was a labelled block. --- test/wasm2js/i64-ctz.2asm.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/wasm2js/i64-ctz.2asm.js') diff --git a/test/wasm2js/i64-ctz.2asm.js b/test/wasm2js/i64-ctz.2asm.js index 3ef91d90b..858ff2ac8 100644 --- a/test/wasm2js/i64-ctz.2asm.js +++ b/test/wasm2js/i64-ctz.2asm.js @@ -127,7 +127,7 @@ function asmFunc(global, env, buffer) { continue label$2; break label$2; } while (1); - }; + } i64toi32_i32$4 = $5$hi; i64toi32_i32$5 = $5; i64toi32_i32$HIGH_BITS = i64toi32_i32$4; -- cgit v1.2.3