operator: self.right.operator + "=",
left: self.left,
right: self.right.right,
- }).optimize(compressor);
+ });
}
- else if (self.right.right instanceof AST_SymbolRef
+ if (self.right.right instanceof AST_SymbolRef
&& self.right.right.name == self.left.name
&& ASSIGN_OPS_COMMUTATIVE[self.right.operator]
&& !self.right.left.has_side_effects(compressor)) {
operator: self.right.operator + "=",
left: self.left,
right: self.right.left,
- }).optimize(compressor);
+ });
}
}
if ((self.operator == "-=" || self.operator == "+="