diff options
author | Alon Zakai <alonzakai@gmail.com> | 2014-07-06 11:16:45 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2014-07-06 11:16:45 -0700 |
commit | cbd3ec6a32e31ab59d89097029db50022df932b8 (patch) | |
tree | f49e531d7a658821788cf8158b1068ad0dbac08b | |
parent | b3e6e8077a4abd70f6acba98127e5788842a6341 (diff) |
fix bug in resurrected optimizeShifts not popping the stack; fixes slow2.test_python
-rw-r--r-- | tools/js-optimizer.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/js-optimizer.js b/tools/js-optimizer.js index 0c689d04..40945d9b 100644 --- a/tools/js-optimizer.js +++ b/tools/js-optimizer.js @@ -1033,6 +1033,8 @@ function optimizeShiftsInternal(ast, conservative) { } else if (type === 'assign' && node[2][0] === 'name' && vars[node[2][1]]) { vars[node[2][1]].defs++; } + }, function() { + stack.pop(); }); // First, break up elements inside a shift. This lets us see clearly what to do next. traverse(fun, function(node, type) { @@ -1195,6 +1197,8 @@ function optimizeShiftsInternal(ast, conservative) { } return node; } + }, function() { + stack.pop(); }); cleanNotes(); var stack = []; @@ -1211,6 +1215,8 @@ function optimizeShiftsInternal(ast, conservative) { return ['name', name + '$s' + data.primaryShift]; } } + }, function() { + stack.pop(); }); cleanNotes(); var SIMPLE_SHIFTS = set('<<', '>>'); @@ -1349,6 +1355,8 @@ function optimizeShiftsInternal(ast, conservative) { } return ret; } + }, function() { + stack.pop(); }); // Note finished variables for (var name in vars) { |