diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-07-16 18:17:54 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-07-16 18:17:54 -0700 |
commit | 105a9678505f3f34242f89aa0d5a28ee9dacfee6 (patch) | |
tree | cc4b2c71b05b0eae5bed973dafd49e4e422953c1 /tools | |
parent | 33ea873c9f04c4419818d44a4066602bfc712a0d (diff) |
add test for not forwarding handled labeled break
Diffstat (limited to 'tools')
-rw-r--r-- | tools/test-js-optimizer-asm-outline1-output.js | 15 | ||||
-rw-r--r-- | tools/test-js-optimizer-asm-outline1.js | 3 |
2 files changed, 12 insertions, 6 deletions
diff --git a/tools/test-js-optimizer-asm-outline1-output.js b/tools/test-js-optimizer-asm-outline1-output.js index 0780484a..00ba667d 100644 --- a/tools/test-js-optimizer-asm-outline1-output.js +++ b/tools/test-js-optimizer-asm-outline1-output.js @@ -73,6 +73,7 @@ function mix() { c(4); c(5); c(6); + c(7); mix$1(sp); mix$0(sp); if (HEAP32[sp + 0 >> 2] == 1) { @@ -80,7 +81,7 @@ function mix() { } if (HEAP32[sp + 0 >> 2] == 2) { switch (HEAP32[sp + 8 >> 2]) { - case 1: + case 2: break main; } } @@ -89,7 +90,7 @@ function mix() { } if (HEAP32[sp + 0 >> 2] == 4) { switch (HEAP32[sp + 8 >> 2]) { - case 2: + case 3: continue main; } } @@ -217,24 +218,25 @@ function lin5$1(sp) { function mix$0(sp) { sp = sp | 0; OL : do { - c(15); c(16); c(17); - HEAP32[sp + 8 >> 2] = 1, HEAP32[sp + 0 >> 2] = 2, break OL; + HEAP32[sp + 8 >> 2] = 2, HEAP32[sp + 0 >> 2] = 2, break OL; c(18); HEAP32[sp + 0 >> 2] = 1, break OL; while (1) { break; } + inner : while (1) { + break inner; + } c(19); HEAP32[sp + 0 >> 2] = 3, break OL; c(20); - HEAP32[sp + 8 >> 2] = 2, HEAP32[sp + 0 >> 2] = 4, break OL; + HEAP32[sp + 8 >> 2] = 3, HEAP32[sp + 0 >> 2] = 4, break OL; } while (0); } function mix$1(sp) { sp = sp | 0; - c(7); c(8); c(9); c(10); @@ -242,5 +244,6 @@ function mix$1(sp) { c(12); c(13); c(14); + c(15); } diff --git a/tools/test-js-optimizer-asm-outline1.js b/tools/test-js-optimizer-asm-outline1.js index 035e32e7..838cbd4e 100644 --- a/tools/test-js-optimizer-asm-outline1.js +++ b/tools/test-js-optimizer-asm-outline1.js @@ -147,6 +147,9 @@ function mix() { while (1) { break; // no need to forward } + inner: while (1) { + break inner; // no need to forward + } c(19); continue; c(20); |