@@ -381,7 +381,10 @@ merge(Compressor.prototype, {
|
||||
&& node.operator == "="
|
||||
&& node.left instanceof AST_SymbolRef) {
|
||||
var d = node.left.definition();
|
||||
if (safe_to_assign(d, node.right)) {
|
||||
if (safe_to_assign(d, node.right)
|
||||
|| d.fixed === undefined && all(d.orig, function(sym) {
|
||||
return sym instanceof AST_SymbolVar;
|
||||
})) {
|
||||
d.references.push(node.left);
|
||||
d.fixed = function() {
|
||||
return node.right;
|
||||
@@ -561,9 +564,9 @@ merge(Compressor.prototype, {
|
||||
if (!safe_to_read(def)) return false;
|
||||
if (def.fixed === false) return false;
|
||||
if (def.fixed != null && (!value || def.references.length > 0)) return false;
|
||||
return !def.orig.some(function(sym) {
|
||||
return sym instanceof AST_SymbolDefun
|
||||
|| sym instanceof AST_SymbolLambda;
|
||||
return all(def.orig, function(sym) {
|
||||
return !(sym instanceof AST_SymbolDefun
|
||||
|| sym instanceof AST_SymbolLambda);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user