Reverting "added option for dropping unused params"

Revert "added option for dropping unused params"

(turns out we already had the `unused` option for this.)

This reverts commit e54df2226f.
This commit is contained in:
Mihai Bazon
2013-07-25 18:08:36 +03:00
parent e54df2226f
commit 41c627379c

View File

@@ -67,7 +67,6 @@ function Compressor(options, false_by_default) {
cascade : !false_by_default, cascade : !false_by_default,
side_effects : !false_by_default, side_effects : !false_by_default,
screw_ie8 : false, screw_ie8 : false,
drop_unused : !false_by_default,
warnings : true, warnings : true,
global_defs : {} global_defs : {}
@@ -84,7 +83,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) {
if (this.options.drop_unused) node.drop_unused(this); node.drop_unused(this);
node = node.hoist_declarations(this); node = node.hoist_declarations(this);
} }
descend(node, this); descend(node, this);
@@ -97,7 +96,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;
if (this.options.drop_unused) node.drop_unused(this); node.drop_unused(this);
this.options.warnings = save_warnings; this.options.warnings = save_warnings;
} }
node._squeezed = true; node._squeezed = true;