|| this.operator == "--"
|| this.expression.has_side_effects(compressor);
});
- def(AST_SymbolRef, function(compressor){ return false });
+ def(AST_SymbolRef, function(compressor){
+ return this.global() && this.undeclared();
+ });
def(AST_Object, function(compressor){
for (var i = this.properties.length; --i >= 0;)
if (this.properties[i].has_side_effects(compressor))
lift_sequences_1: {
options = { sequences: true };
input: {
+ var foo, x, y, bar;
foo = !(x(), y(), bar());
}
expect: {
+ var foo, x, y, bar;
x(), y(), foo = !bar();
}
}
lift_sequences_2: {
options = { sequences: true, evaluate: true };
input: {
+ var foo, bar;
foo.x = (foo = {}, 10);
bar = (bar = {}, 10);
}
expect: {
+ var foo, bar;
foo.x = (foo = {}, 10),
bar = {}, bar = 10;
}
lift_sequences_3: {
options = { sequences: true, conditionals: true };
input: {
+ var x, foo, bar, baz;
x = (foo(), bar(), baz()) ? 10 : 20;
}
expect: {
+ var x, foo, bar, baz;
foo(), bar(), x = baz() ? 10 : 20;
}
}
lift_sequences_4: {
options = { side_effects: true };
input: {
+ var x, foo, bar, baz;
x = (foo, bar, baz);
}
expect: {
+ var x, foo, bar, baz;
x = baz;
}
}