summaryrefslogtreecommitdiff
path: root/test/unit.asm.js
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2016-08-23 11:39:58 -0700
committerAlon Zakai <alonzakai@gmail.com>2016-09-07 09:55:06 -0700
commit14fe75e4d6e670d2e7f3e171d3d96c340b574eab (patch)
tree26e4122a719e557c48a5d7d7f4de52bdc86054af /test/unit.asm.js
parent1d3f3dda67c24c148dce13734c21cdab487ddc87 (diff)
downloadbinaryen-14fe75e4d6e670d2e7f3e171d3d96c340b574eab.tar.gz
binaryen-14fe75e4d6e670d2e7f3e171d3d96c340b574eab.tar.bz2
binaryen-14fe75e4d6e670d2e7f3e171d3d96c340b574eab.zip
when replacing an if with its condition (when it has no body), we must drop it
Diffstat (limited to 'test/unit.asm.js')
-rw-r--r--test/unit.asm.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/unit.asm.js b/test/unit.asm.js
index b4c10b1d2..8f0812e29 100644
--- a/test/unit.asm.js
+++ b/test/unit.asm.js
@@ -308,6 +308,17 @@ function asm(global, env, buffer) {
} while(0);
}
+ function ifChainEmpty(label) {
+ label = label | 0;
+ if ((label|0) == 4) {
+ return 0;
+ }
+ else if ((label|0) == 7) {
+ // unreachable;
+ }
+ return 0;
+ }
+
function z() {
}
function w() {