diff options
author | Alon Zakai <alonzakai@gmail.com> | 2011-12-22 18:41:02 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2011-12-22 18:41:02 -0800 |
commit | 58f9fb35ab2f8440ff36d9353f18e390473f19d6 (patch) | |
tree | de525381b5e821cde5b473f7ba14c05c860fe519 /tools/test-js-optimizer.js | |
parent | 6eaf330462b1da305acaf9ba5d02dea3a34ae711 (diff) |
fix some hoisting bugs, including not hoisting inside inner loops
Diffstat (limited to 'tools/test-js-optimizer.js')
-rw-r--r-- | tools/test-js-optimizer.js | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/tools/test-js-optimizer.js b/tools/test-js-optimizer.js index 30e8234f..185d8f49 100644 --- a/tools/test-js-optimizer.js +++ b/tools/test-js-optimizer.js @@ -209,4 +209,25 @@ function demangle($cmp) { } } while (0); } -// EMSCRIPTEN_GENERATED_FUNCTIONS: ["abc", "xyz", "xyz2", "expr", "loopy", "bits", "maths", "hoisting", "demangle"] +function lua() { + $5$98 : while (1) { + if ($14) { + __label__ = 3; + } else { + __label__ = 4; + } + $15$$16$101 : do { + if (__label__ == 3) {} else if (__label__ == 4) { + var $17 = $i; + var $18 = $3; + var $19 = $18 + ($17 << 2) | 0; + var $20 = HEAP32[$19 >> 2]; + var $21 = $20 + 1 | 0; + var $22 = HEAP8[$21]; + var $23 = $22 << 24 >> 24; + break $15$$16$101; + } + } while(0); + } +} +// EMSCRIPTEN_GENERATED_FUNCTIONS: ["abc", "xyz", "xyz2", "expr", "loopy", "bits", "maths", "hoisting", "demangle", "lua"] |