@@ -10446,9 +10446,8 @@ Compressor.prototype.compress = function(node) {
|
||||
append_var(decl_var, expr_var, name, value);
|
||||
if (!in_loop) continue;
|
||||
if (arg_used.has(name.name)) continue;
|
||||
var def = fn.variables.get(name.name);
|
||||
if (fn.functions.has(name.name) && def.orig.length == 1) continue;
|
||||
var def = fn.variables.get(name.name);
|
||||
var def = name.definition();
|
||||
if (def.orig.length == 1 && fn.functions.has(name.name)) continue;
|
||||
var sym = make_node(AST_SymbolRef, name, name);
|
||||
def.references.push(sym);
|
||||
expr_loop.push(make_node(AST_Assign, var_def, {
|
||||
@@ -13094,8 +13093,8 @@ Compressor.prototype.compress = function(node) {
|
||||
scope.variables.set(name, def);
|
||||
def.single_use = false;
|
||||
if (!in_loop) return;
|
||||
if (fn.functions.has(name) && def.orig.length == 1) return;
|
||||
if (def.references.length == def.replaced) return;
|
||||
if (def.orig.length == 1 && fn.functions.has(name)) return;
|
||||
if (!all(def.orig, function(sym) {
|
||||
if (sym instanceof AST_SymbolConst) return false;
|
||||
if (sym instanceof AST_SymbolFunarg) return def.scope.resolve() !== fn;
|
||||
|
||||
Reference in New Issue
Block a user