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