diff options
author | Alon Zakai <alonzakai@gmail.com> | 2012-05-16 16:09:11 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2012-05-16 16:09:11 -0700 |
commit | 6403c1b060a3a7e150b858fc69a3d40570c0adfc (patch) | |
tree | c2fe0167eab3bd07e2fa4c7be1259b3c7da43caf /tools/test-js-optimizer-regs.js | |
parent | a7f046807762d234b49f28e47f53d97c8d379e00 (diff) |
fix js optimizer bug with not emitting a ';' that lead to joined instructions
Diffstat (limited to 'tools/test-js-optimizer-regs.js')
-rw-r--r-- | tools/test-js-optimizer-regs.js | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/tools/test-js-optimizer-regs.js b/tools/test-js-optimizer-regs.js index faf1c91b..576e2f8c 100644 --- a/tools/test-js-optimizer-regs.js +++ b/tools/test-js-optimizer-regs.js @@ -180,4 +180,27 @@ function fcntl_open() { return 0; return null; } -// EMSCRIPTEN_GENERATED_FUNCTIONS: ["test", "primes", "atomic", "fcntl_open"] +function ex() { + var __stackBase__ = STACKTOP; + STACKTOP += 4; + var $e1 = __stackBase__; + var $puts = _puts(STRING_TABLE._str17 | 0); + var $x41 = $e1 | 0; + var $i_04 = 0; + while (1) { + var $i_04; + var $call1 = _printf(STRING_TABLE.__str15 | 0, (tempInt = STACKTOP, STACKTOP += 4, HEAP32[tempInt >> 2] = $i_04, tempInt)); + ((function() { + try { + __THREW__ = false; + return __Z5magici($i_04); + } catch (e) { + if (typeof e != "number") throw e; + if (ABORT) throw e; + __THREW__ = true; + return null; + } + }))(); + } +} +// EMSCRIPTEN_GENERATED_FUNCTIONS: ["test", "primes", "atomic", "fcntl_open", "ex"] |