summaryrefslogtreecommitdiff
path: root/test/wasm2js/switch.2asm.js
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2019-04-17 10:34:54 -0700
committerGitHub <noreply@github.com>2019-04-17 10:34:54 -0700
commitf75cf7fe9a70ec7041f758f061ac45deed18f4ab (patch)
tree6388084bdb173b613e57cc0661d58ac7de45d690 /test/wasm2js/switch.2asm.js
parent4a1a935ff0e30c9e46f4b7469488a5b6ffee2714 (diff)
downloadbinaryen-f75cf7fe9a70ec7041f758f061ac45deed18f4ab.tar.gz
binaryen-f75cf7fe9a70ec7041f758f061ac45deed18f4ab.tar.bz2
binaryen-f75cf7fe9a70ec7041f758f061ac45deed18f4ab.zip
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.
Diffstat (limited to 'test/wasm2js/switch.2asm.js')
-rw-r--r--test/wasm2js/switch.2asm.js48
1 files changed, 24 insertions, 24 deletions
diff --git a/test/wasm2js/switch.2asm.js b/test/wasm2js/switch.2asm.js
index 6fdd6725f..84797a125 100644
--- a/test/wasm2js/switch.2asm.js
+++ b/test/wasm2js/switch.2asm.js
@@ -56,24 +56,24 @@ function asmFunc(global, env, buffer) {
default:
break default_;
};
- };
+ }
return i | 0;
- };
- };
- };
+ }
+ }
+ }
j = 0 - i | 0;
break switch_;
- };
+ }
break switch_;
- };
+ }
j = 101;
break switch_;
- };
+ }
j = 101;
- };
+ }
j = 102;
- };
- };
+ }
+ }
return j | 0;
}
@@ -113,34 +113,34 @@ function asmFunc(global, env, buffer) {
default:
break default_;
};
- };
+ }
i64toi32_i32$HIGH_BITS = i$hi;
return i | 0;
- };
- };
- };
+ }
+ }
+ }
i64toi32_i32$2 = 0;
i64toi32_i32$5 = (i64toi32_i32$2 >>> 0 < i >>> 0) + i$hi | 0;
i64toi32_i32$5 = 0 - i64toi32_i32$5 | 0;
$7_1 = i64toi32_i32$2 - i | 0;
$7$hi = i64toi32_i32$5;
break switch_;
- };
+ }
i64toi32_i32$5 = 0;
j = 101;
j$hi = i64toi32_i32$5;
- };
- };
- };
+ }
+ }
+ }
i64toi32_i32$5 = j$hi;
$7_1 = j;
$7$hi = i64toi32_i32$5;
break switch_;
- };
+ }
i64toi32_i32$5 = 4294967295;
$7_1 = 4294967291;
$7$hi = i64toi32_i32$5;
- };
+ }
i64toi32_i32$5 = $7$hi;
i64toi32_i32$2 = $7_1;
i64toi32_i32$HIGH_BITS = i64toi32_i32$5;
@@ -169,13 +169,13 @@ function asmFunc(global, env, buffer) {
default:
break default_;
};
- };
+ }
$6_1 = 1e3 + $9 | 0;
- };
+ }
$7_1 = 100 + $6_1 | 0;
- };
+ }
$8 = 10 + $7_1 | 0;
- };
+ }
return $8 | 0;
}