@@ -1911,6 +1911,7 @@ merge(Compressor.prototype, {
|
|||||||
right: ref,
|
right: ref,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
ref.fixed = false;
|
||||||
def.replaced++;
|
def.replaced++;
|
||||||
return ref;
|
return ref;
|
||||||
}
|
}
|
||||||
@@ -1991,6 +1992,7 @@ merge(Compressor.prototype, {
|
|||||||
&& !compressor.exposed(def);
|
&& !compressor.exposed(def);
|
||||||
value_def.last_ref = false;
|
value_def.last_ref = false;
|
||||||
value_def.single_use = false;
|
value_def.single_use = false;
|
||||||
|
CHANGED = true;
|
||||||
}
|
}
|
||||||
if (replaced && !remove_candidate(candidate)) statements.splice(stat_index, 1);
|
if (replaced && !remove_candidate(candidate)) statements.splice(stat_index, 1);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9049,7 +9049,7 @@ issue_4874: {
|
|||||||
}
|
}
|
||||||
expect: {
|
expect: {
|
||||||
var a;
|
var a;
|
||||||
null;
|
a = null;
|
||||||
(function(b) {
|
(function(b) {
|
||||||
for (var c in a && a[console.log("PASS")])
|
for (var c in a && a[console.log("PASS")])
|
||||||
console;
|
console;
|
||||||
@@ -9107,3 +9107,26 @@ issue_4895: {
|
|||||||
}
|
}
|
||||||
expect_stdout: "42 42"
|
expect_stdout: "42 42"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
issue_4908: {
|
||||||
|
options = {
|
||||||
|
collapse_vars: true,
|
||||||
|
join_vars: true,
|
||||||
|
reduce_vars: true,
|
||||||
|
toplevel: true,
|
||||||
|
}
|
||||||
|
input: {
|
||||||
|
var a = 0;
|
||||||
|
var b;
|
||||||
|
console || a++;
|
||||||
|
var c = d = a, d = [ c && c, d += 42 ];
|
||||||
|
console.log(d[1]);
|
||||||
|
}
|
||||||
|
expect: {
|
||||||
|
var a = 0, b;
|
||||||
|
console || a++;
|
||||||
|
var c = d = a, d = [ d && d, d += 42 ];
|
||||||
|
console.log(d[1]);
|
||||||
|
}
|
||||||
|
expect_stdout: "42"
|
||||||
|
}
|
||||||
|
|||||||
@@ -6107,7 +6107,7 @@ reduce_cross_reference_2: {
|
|||||||
reduce_cross_reference_2_toplevel: {
|
reduce_cross_reference_2_toplevel: {
|
||||||
options = {
|
options = {
|
||||||
collapse_vars: true,
|
collapse_vars: true,
|
||||||
passes: 2,
|
passes: 3,
|
||||||
pure_getters: "strict",
|
pure_getters: "strict",
|
||||||
reduce_vars: true,
|
reduce_vars: true,
|
||||||
sequences: true,
|
sequences: true,
|
||||||
@@ -6150,7 +6150,7 @@ reduce_cross_reference_3: {
|
|||||||
reduce_cross_reference_3_toplevel: {
|
reduce_cross_reference_3_toplevel: {
|
||||||
options = {
|
options = {
|
||||||
collapse_vars: true,
|
collapse_vars: true,
|
||||||
passes: 2,
|
passes: 3,
|
||||||
pure_getters: "strict",
|
pure_getters: "strict",
|
||||||
reduce_vars: true,
|
reduce_vars: true,
|
||||||
sequences: true,
|
sequences: true,
|
||||||
|
|||||||
Reference in New Issue
Block a user