Merge 0e1f5e2990 into b1febde3e9
This commit is contained in:
commit
a22135fca7
|
|
@ -68,6 +68,7 @@ function Compressor(options, false_by_default) {
|
||||||
side_effects : !false_by_default,
|
side_effects : !false_by_default,
|
||||||
screw_ie8 : false,
|
screw_ie8 : false,
|
||||||
|
|
||||||
|
dropUnused : true,
|
||||||
warnings : true,
|
warnings : true,
|
||||||
global_defs : {}
|
global_defs : {}
|
||||||
}, true);
|
}, true);
|
||||||
|
|
@ -83,7 +84,7 @@ merge(Compressor.prototype, {
|
||||||
before: function(node, descend, in_list) {
|
before: function(node, descend, in_list) {
|
||||||
if (node._squeezed) return node;
|
if (node._squeezed) return node;
|
||||||
if (node instanceof AST_Scope) {
|
if (node instanceof AST_Scope) {
|
||||||
node.drop_unused(this);
|
if (this.options.dropUnused) node.drop_unused(this);
|
||||||
node = node.hoist_declarations(this);
|
node = node.hoist_declarations(this);
|
||||||
}
|
}
|
||||||
descend(node, this);
|
descend(node, this);
|
||||||
|
|
@ -96,7 +97,7 @@ merge(Compressor.prototype, {
|
||||||
// no point to repeat warnings.
|
// no point to repeat warnings.
|
||||||
var save_warnings = this.options.warnings;
|
var save_warnings = this.options.warnings;
|
||||||
this.options.warnings = false;
|
this.options.warnings = false;
|
||||||
node.drop_unused(this);
|
if (this.options.dropUnused) node.drop_unused(this);
|
||||||
this.options.warnings = save_warnings;
|
this.options.warnings = save_warnings;
|
||||||
}
|
}
|
||||||
node._squeezed = true;
|
node._squeezed = true;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user