diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-01-08 16:50:37 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-01-08 16:50:37 -0800 |
commit | c31a515ee32a2aef2194e09e3f977c6961fce410 (patch) | |
tree | 99d6a144c1d3c2f6b3adc998de0734af1d2298c5 /tools/js-optimizer.js | |
parent | 78dbafb289e222550abda6b53e7099352a599804 (diff) |
improve |0 removal in asm mode a little
Diffstat (limited to 'tools/js-optimizer.js')
-rw-r--r-- | tools/js-optimizer.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/js-optimizer.js b/tools/js-optimizer.js index 7fe8d99f..a8753e6f 100644 --- a/tools/js-optimizer.js +++ b/tools/js-optimizer.js @@ -425,7 +425,6 @@ function simplifyExpressionsPre(ast, asm) { if (stack[i] == 1) { // we will replace ourselves with the non-zero side. Recursively process that node. var result = jsonCompare(node[2], ZERO) ? node[3] : node[2], other; - if (asm && result[0] == 'sub') break; // we must keep a coercion right on top of a heap access in asm mode // Great, we can eliminate rerun = true; while (other = process(result, result[0], stack)) { @@ -434,6 +433,8 @@ function simplifyExpressionsPre(ast, asm) { return result; } else if (stack[i] == -1) { break; // Too bad, we can't + } else if (asm) { + break; // we must keep a coercion right on top of a heap access in asm mode } } stack.push(1); // From here on up, no need for this kind of correction, it's done at the top |