@@ -6234,9 +6234,9 @@ merge(Compressor.prototype, {
|
|||||||
&& !fn.uses_arguments
|
&& !fn.uses_arguments
|
||||||
&& !fn.pinned()
|
&& !fn.pinned()
|
||||||
&& !(fn.name && fn instanceof AST_Function)
|
&& !(fn.name && fn instanceof AST_Function)
|
||||||
&& (value = can_flatten_body(stat))
|
|
||||||
&& (exp === fn
|
&& (exp === fn
|
||||||
|| !recursive_ref(compressor, def = exp.definition()) && fn.is_constant_expression(exp.scope))
|
|| !recursive_ref(compressor, def = exp.definition()) && fn.is_constant_expression(exp.scope))
|
||||||
|
&& (value = can_flatten_body(stat))
|
||||||
&& !fn.contains_this()) {
|
&& !fn.contains_this()) {
|
||||||
if (can_substitute_directly()) {
|
if (can_substitute_directly()) {
|
||||||
var args = self.args.slice();
|
var args = self.args.slice();
|
||||||
|
|||||||
@@ -4680,3 +4680,28 @@ issue_3852: {
|
|||||||
}
|
}
|
||||||
expect_stdout: "PASS"
|
expect_stdout: "PASS"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
issue_3911: {
|
||||||
|
options = {
|
||||||
|
collapse_vars: true,
|
||||||
|
conditionals: true,
|
||||||
|
inline: true,
|
||||||
|
reduce_vars: true,
|
||||||
|
toplevel: true,
|
||||||
|
unused: true,
|
||||||
|
}
|
||||||
|
input: {
|
||||||
|
function f() {
|
||||||
|
return function() {
|
||||||
|
if (a) (a++, b += a);
|
||||||
|
f();
|
||||||
|
};
|
||||||
|
}
|
||||||
|
var a = f, b;
|
||||||
|
console.log("PASS");
|
||||||
|
}
|
||||||
|
expect: {
|
||||||
|
console.log("PASS");
|
||||||
|
}
|
||||||
|
expect_stdout: "PASS"
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user