@@ -8002,7 +8002,6 @@ Compressor.prototype.compress = function(node) {
|
|||||||
var defs = defs_by_id[node.definition().id];
|
var defs = defs_by_id[node.definition().id];
|
||||||
if (!defs) return;
|
if (!defs) return;
|
||||||
if (node.fixed_value() !== defs.value) return;
|
if (node.fixed_value() !== defs.value) return;
|
||||||
if (is_lhs(node, this.parent())) return;
|
|
||||||
return make_node(AST_Object, node, { properties: [] });
|
return make_node(AST_Object, node, { properties: [] });
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
|
|||||||
@@ -2005,40 +2005,6 @@ issue_5192: {
|
|||||||
node_version: ">=6"
|
node_version: ">=6"
|
||||||
}
|
}
|
||||||
|
|
||||||
issue_5222: {
|
|
||||||
options = {
|
|
||||||
hoist_props: true,
|
|
||||||
inline: true,
|
|
||||||
reduce_vars: true,
|
|
||||||
side_effects: true,
|
|
||||||
toplevel: true,
|
|
||||||
unused: true,
|
|
||||||
}
|
|
||||||
input: {
|
|
||||||
function f() {
|
|
||||||
do {
|
|
||||||
(function() {
|
|
||||||
var a = {
|
|
||||||
p: [ a ] = [],
|
|
||||||
};
|
|
||||||
})();
|
|
||||||
} while (console.log("PASS"));
|
|
||||||
}
|
|
||||||
f();
|
|
||||||
}
|
|
||||||
expect: {
|
|
||||||
do {
|
|
||||||
a = void 0,
|
|
||||||
a = {
|
|
||||||
p: [ a ] = [],
|
|
||||||
};
|
|
||||||
} while (console.log("PASS"));
|
|
||||||
var a;
|
|
||||||
}
|
|
||||||
expect_stdout: "PASS"
|
|
||||||
node_version: ">=6"
|
|
||||||
}
|
|
||||||
|
|
||||||
issue_5246_1: {
|
issue_5246_1: {
|
||||||
options = {
|
options = {
|
||||||
pure_getters: true,
|
pure_getters: true,
|
||||||
|
|||||||
@@ -3368,6 +3368,40 @@ issue_5189_2: {
|
|||||||
node_version: ">=6"
|
node_version: ">=6"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
issue_5222: {
|
||||||
|
options = {
|
||||||
|
hoist_props: true,
|
||||||
|
inline: true,
|
||||||
|
reduce_vars: true,
|
||||||
|
side_effects: true,
|
||||||
|
toplevel: true,
|
||||||
|
unused: true,
|
||||||
|
}
|
||||||
|
input: {
|
||||||
|
function f() {
|
||||||
|
do {
|
||||||
|
(function() {
|
||||||
|
var a = {
|
||||||
|
p: [ a ] = [],
|
||||||
|
};
|
||||||
|
})();
|
||||||
|
} while (console.log("PASS"));
|
||||||
|
}
|
||||||
|
f();
|
||||||
|
}
|
||||||
|
expect: {
|
||||||
|
do {
|
||||||
|
a = void 0,
|
||||||
|
a = {
|
||||||
|
p: [ a ] = [],
|
||||||
|
};
|
||||||
|
} while (console.log("PASS"));
|
||||||
|
var a;
|
||||||
|
}
|
||||||
|
expect_stdout: "PASS"
|
||||||
|
node_version: ">=6"
|
||||||
|
}
|
||||||
|
|
||||||
issue_5288: {
|
issue_5288: {
|
||||||
options = {
|
options = {
|
||||||
conditionals: true,
|
conditionals: true,
|
||||||
|
|||||||
Reference in New Issue
Block a user