fix AST_Node.optimize() (#1602)

Liberal use of `Compressor.transform()` and `AST_Node.optimize()` presents an issue for look-up operations like `TreeWalker.in_boolean_context()` and `TreeWalker.parent()`.

This is an incremental fix such that `AST_Node.optimize()` would now contain the correct stack information when called correctly.
This commit is contained in:
Alex Lam S.L
2017-03-15 18:44:13 +08:00
committed by GitHub
parent 381bd3836e
commit 8223b2e0db
3 changed files with 164 additions and 38 deletions

View File

@@ -126,9 +126,11 @@ function merge(obj, ext) {
return count;
};
function noop() {};
function noop() {}
function return_false() { return false; }
function return_true() { return true; }
function return_this() { return this; }
function return_null() { return null; }
var MAP = (function(){
function MAP(a, f, backwards) {