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-output.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-output.js')
-rw-r--r-- | tools/test-js-optimizer-regs-output.js | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/tools/test-js-optimizer-regs-output.js b/tools/test-js-optimizer-regs-output.js index 50c67869..16d675b8 100644 --- a/tools/test-js-optimizer-regs-output.js +++ b/tools/test-js-optimizer-regs-output.js @@ -174,4 +174,27 @@ function fcntl_open() { return 0; return null; } -// EMSCRIPTEN_GENERATED_FUNCTIONS: ["test", "primes", "atomic", "fcntl_open"] +function ex() { + var r1, r2; + r1 = STACKTOP; + STACKTOP += 4; + r2 = r1; + r1 = _puts(STRING_TABLE._str17 | 0); + r1 = r2 | 0; + r2 = 0; + while (1) { + r1 = _printf(STRING_TABLE.__str15 | 0, (tempInt = STACKTOP, STACKTOP += 4, HEAP32[tempInt >> 2] = r2, tempInt)); + ((function() { + try { + __THREW__ = false; + return __Z5magici(r2); + } 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"] |