@@ -3601,14 +3601,7 @@ merge(Compressor.prototype, {
|
|||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
def(AST_Binary, function(compressor) {
|
def(AST_Binary, function(compressor) {
|
||||||
switch (this.operator) {
|
return lazy_op[this.operator] && (this.left._dot_throw(compressor) || this.right._dot_throw(compressor));
|
||||||
case "&&":
|
|
||||||
return this.left._dot_throw(compressor) || this.right._dot_throw(compressor);
|
|
||||||
case "||":
|
|
||||||
return this.right._dot_throw(compressor);
|
|
||||||
default:
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
def(AST_Class, return_false);
|
def(AST_Class, return_false);
|
||||||
def(AST_Conditional, function(compressor) {
|
def(AST_Conditional, function(compressor) {
|
||||||
|
|||||||
@@ -1320,11 +1320,10 @@ issue_2878: {
|
|||||||
|
|
||||||
issue_3427: {
|
issue_3427: {
|
||||||
options = {
|
options = {
|
||||||
assignments: true,
|
evaluate: true,
|
||||||
collapse_vars: true,
|
|
||||||
inline: true,
|
inline: true,
|
||||||
passes: 2,
|
|
||||||
pure_getters: "strict",
|
pure_getters: "strict",
|
||||||
|
reduce_vars: true,
|
||||||
sequences: true,
|
sequences: true,
|
||||||
side_effects: true,
|
side_effects: true,
|
||||||
toplevel: true,
|
toplevel: true,
|
||||||
@@ -1536,3 +1535,32 @@ this_toString: {
|
|||||||
expect_stdout: "[object Object]"
|
expect_stdout: "[object Object]"
|
||||||
node_version: ">=4"
|
node_version: ">=4"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
issue_4803: {
|
||||||
|
options = {
|
||||||
|
hoist_vars: true,
|
||||||
|
pure_getters: "strict",
|
||||||
|
reduce_vars: true,
|
||||||
|
side_effects: true,
|
||||||
|
toplevel: true,
|
||||||
|
}
|
||||||
|
input: {
|
||||||
|
var o = {
|
||||||
|
get f() {
|
||||||
|
console.log("PASS");
|
||||||
|
},
|
||||||
|
} || 42;
|
||||||
|
for (var k in o)
|
||||||
|
o[k];
|
||||||
|
}
|
||||||
|
expect: {
|
||||||
|
var k, o = {
|
||||||
|
get f() {
|
||||||
|
console.log("PASS");
|
||||||
|
},
|
||||||
|
} || 42;
|
||||||
|
for (k in o)
|
||||||
|
o[k];
|
||||||
|
}
|
||||||
|
expect_stdout: "PASS"
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user