@@ -3206,6 +3206,10 @@ merge(Compressor.prototype, {
|
|||||||
if (!(node_def.id in in_use_ids)) {
|
if (!(node_def.id in in_use_ids)) {
|
||||||
in_use_ids[node_def.id] = true;
|
in_use_ids[node_def.id] = true;
|
||||||
in_use.push(node_def);
|
in_use.push(node_def);
|
||||||
|
if (node_def = node_def.redefined()) {
|
||||||
|
in_use_ids[node_def.id] = true;
|
||||||
|
in_use.push(node_def);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1237,6 +1237,7 @@ var_catch_toplevel: {
|
|||||||
options = {
|
options = {
|
||||||
conditionals: true,
|
conditionals: true,
|
||||||
negate_iife: true,
|
negate_iife: true,
|
||||||
|
passes: 2,
|
||||||
reduce_funcs: true,
|
reduce_funcs: true,
|
||||||
reduce_vars: true,
|
reduce_vars: true,
|
||||||
side_effects: true,
|
side_effects: true,
|
||||||
|
|||||||
@@ -1516,7 +1516,8 @@ issue_2647_2: {
|
|||||||
}
|
}
|
||||||
expect: {
|
expect: {
|
||||||
(function() {
|
(function() {
|
||||||
console.log("pass".toUpperCase());
|
console.log((() => (x = "pass", x.toUpperCase()))());
|
||||||
|
var x;
|
||||||
})();
|
})();
|
||||||
}
|
}
|
||||||
expect_stdout: "PASS"
|
expect_stdout: "PASS"
|
||||||
|
|||||||
@@ -5632,6 +5632,8 @@ defun_catch_1: {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
expect: {
|
expect: {
|
||||||
|
// TODO: drop unused AST_Defun
|
||||||
|
function a() {}
|
||||||
try {
|
try {
|
||||||
throw 42;
|
throw 42;
|
||||||
} catch (a) {
|
} catch (a) {
|
||||||
@@ -5657,6 +5659,8 @@ defun_catch_2: {
|
|||||||
}
|
}
|
||||||
expect: {
|
expect: {
|
||||||
try {
|
try {
|
||||||
|
// TODO: drop unused AST_Defun
|
||||||
|
function a() {}
|
||||||
throw 42;
|
throw 42;
|
||||||
} catch (a) {
|
} catch (a) {
|
||||||
console.log(a);
|
console.log(a);
|
||||||
@@ -5682,6 +5686,8 @@ defun_catch_3: {
|
|||||||
expect: {
|
expect: {
|
||||||
try {
|
try {
|
||||||
throw 42;
|
throw 42;
|
||||||
|
// TODO: drop unused AST_Defun
|
||||||
|
function a() {}
|
||||||
} catch (a) {
|
} catch (a) {
|
||||||
console.log(a);
|
console.log(a);
|
||||||
}
|
}
|
||||||
@@ -5759,6 +5765,8 @@ defun_catch_6: {
|
|||||||
} catch (a) {
|
} catch (a) {
|
||||||
console.log(a);
|
console.log(a);
|
||||||
}
|
}
|
||||||
|
// TODO: drop unused AST_Defun
|
||||||
|
function a() {}
|
||||||
}
|
}
|
||||||
expect_stdout: "42"
|
expect_stdout: "42"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -208,9 +208,6 @@ function run_compress_tests() {
|
|||||||
});
|
});
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (!reminify(test.options, input_code, input_formatted, test.expect_stdout)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user