diff options
author | Alon Zakai <alonzakai@gmail.com> | 2012-12-31 11:49:14 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2012-12-31 11:49:14 -0800 |
commit | ada59f0a9d23d8ec19ee6a1326977ddf6e93f5f9 (patch) | |
tree | 1e1f079b5569ae2d7269ff2abf4b520ad82d3cdd /tools/js-optimizer.js | |
parent | 2f4401a79e96917f78876c3e09b8d31754a26f70 (diff) | |
parent | e97f48a2c9376354a6b8927191322322f13808ba (diff) |
Merge branch 'incoming'
Diffstat (limited to 'tools/js-optimizer.js')
-rw-r--r-- | tools/js-optimizer.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/js-optimizer.js b/tools/js-optimizer.js index 62161738..dbef9c0c 100644 --- a/tools/js-optimizer.js +++ b/tools/js-optimizer.js @@ -1715,6 +1715,10 @@ function eliminate(ast, memSafe) { } else if (type == 'if') { if (allowTracking) { traverseInOrder(node[1]); // can eliminate into condition, but nowhere else + if (!callsInvalidated) { // invalidate calls, since we cannot eliminate them into an if that may not execute! + invalidateCalls(); + callsInvalidated = true; + } allowTracking = false; traverseInOrder(node[2]); // 2 and 3 could be 'parallel', really.. if (node[3]) traverseInOrder(node[3]); |