remove obsolete .scope workaround
This commit is contained in:
parent
8698e8254a
commit
131fb219a5
|
|
@ -3530,6 +3530,7 @@ merge(Compressor.prototype, {
|
|||
&& !exp.uses_arguments
|
||||
&& !exp.uses_eval
|
||||
&& exp.body.length == 1
|
||||
&& !exp.contains_this()
|
||||
&& all(exp.argnames, function(arg) {
|
||||
return arg.__unused;
|
||||
})
|
||||
|
|
@ -3543,23 +3544,6 @@ merge(Compressor.prototype, {
|
|||
expression: stat.body
|
||||
});
|
||||
}
|
||||
if (value) {
|
||||
var tw = new TreeWalker(function(node) {
|
||||
if (!value) return true;
|
||||
if (node instanceof AST_SymbolRef) {
|
||||
var ref = node.scope.find_variable(node);
|
||||
if (ref && ref.scope.parent_scope === fn.parent_scope) {
|
||||
value = null;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if (node instanceof AST_This && !tw.find_parent(AST_Scope)) {
|
||||
value = null;
|
||||
return true;
|
||||
}
|
||||
});
|
||||
value.walk(tw);
|
||||
}
|
||||
if (value) {
|
||||
var args = self.args.concat(value);
|
||||
return make_sequence(self, args).optimize(compressor);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user