diff options
author | Alon Zakai <alonzakai@gmail.com> | 2016-08-23 11:39:58 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2016-09-07 09:55:06 -0700 |
commit | 14fe75e4d6e670d2e7f3e171d3d96c340b574eab (patch) | |
tree | 26e4122a719e557c48a5d7d7f4de52bdc86054af /test/unit.asm.js | |
parent | 1d3f3dda67c24c148dce13734c21cdab487ddc87 (diff) | |
download | binaryen-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.js | 11 |
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() { |