@@ -701,8 +701,11 @@ merge(Compressor.prototype, {
|
|||||||
node.argnames.forEach(function(arg, i) {
|
node.argnames.forEach(function(arg, i) {
|
||||||
var d = arg.definition();
|
var d = arg.definition();
|
||||||
if (d.fixed === undefined && (!node.uses_arguments || tw.has_directive("use strict"))) {
|
if (d.fixed === undefined && (!node.uses_arguments || tw.has_directive("use strict"))) {
|
||||||
|
var value = iife.args[i];
|
||||||
d.fixed = function() {
|
d.fixed = function() {
|
||||||
return iife.args[i] || make_node(AST_Undefined, iife);
|
var j = node.argnames.indexOf(arg);
|
||||||
|
if (j < 0) return value;
|
||||||
|
return iife.args[j] || make_node(AST_Undefined, iife);
|
||||||
};
|
};
|
||||||
tw.loop_ids[d.id] = tw.in_loop;
|
tw.loop_ids[d.id] = tw.in_loop;
|
||||||
mark(tw, d, true);
|
mark(tw, d, true);
|
||||||
|
|||||||
@@ -6774,3 +6774,30 @@ issue_3509: {
|
|||||||
}
|
}
|
||||||
expect_stdout: "PASS"
|
expect_stdout: "PASS"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
issue_3622: {
|
||||||
|
options = {
|
||||||
|
evaluate: true,
|
||||||
|
inline: true,
|
||||||
|
keep_fargs: "strict",
|
||||||
|
reduce_vars: true,
|
||||||
|
sequences: true,
|
||||||
|
toplevel: true,
|
||||||
|
unused: true,
|
||||||
|
}
|
||||||
|
input: {
|
||||||
|
var c = "FAIL";
|
||||||
|
!function(b, a) {
|
||||||
|
a && (c = "PASS");
|
||||||
|
}(42, this);
|
||||||
|
console.log(c);
|
||||||
|
}
|
||||||
|
expect: {
|
||||||
|
var c = "FAIL";
|
||||||
|
var a;
|
||||||
|
a = this,
|
||||||
|
!void (a && (c = "PASS")),
|
||||||
|
console.log(c);
|
||||||
|
}
|
||||||
|
expect_stdout: "PASS"
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user