improve performance (#3020)
- replace `find_if()` with `all()` wherever possible - move ESTree-specific logic out of `figure_out_scope()`
This commit is contained in:
@@ -3525,8 +3525,9 @@ merge(Compressor.prototype, {
|
||||
var defs = [];
|
||||
vars.each(function(def, name){
|
||||
if (self instanceof AST_Lambda
|
||||
&& find_if(function(x){ return x.name == def.name.name },
|
||||
self.argnames)) {
|
||||
&& !all(self.argnames, function(argname) {
|
||||
return argname.name != name;
|
||||
})) {
|
||||
vars.del(name);
|
||||
} else {
|
||||
def = def.clone();
|
||||
|
||||
Reference in New Issue
Block a user