Keep unused function arguments by default
Discarding unused function arguments affects function.length, which can lead to some hard to debug issues. This optimization is now done only in "unsafe mode". Fix #121
This commit is contained in:
@@ -1086,7 +1086,7 @@ merge(Compressor.prototype, {
|
||||
var tt = new TreeTransformer(
|
||||
function before(node, descend, in_list) {
|
||||
if (node instanceof AST_Lambda && !(node instanceof AST_Accessor)) {
|
||||
if (!compressor.option("keep_fargs")) {
|
||||
if (compressor.option("unsafe") && !compressor.option("keep_fargs")) {
|
||||
for (var a = node.argnames, i = a.length; --i >= 0;) {
|
||||
var sym = a[i];
|
||||
if (sym.unreferenced()) {
|
||||
|
||||
Reference in New Issue
Block a user