aboutsummaryrefslogtreecommitdiff
path: root/lib/compress.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/compress.js')
-rw-r--r--lib/compress.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/compress.js b/lib/compress.js
index e3846c31..81b9ccac 100644
--- a/lib/compress.js
+++ b/lib/compress.js
@@ -3187,17 +3187,16 @@ merge(Compressor.prototype, {
if (exp.argnames.length > 0) {
fn.body.push(make_node(AST_Var, self, {
definitions: exp.argnames.map(function(sym, i) {
- var arg = self.args[i];
return make_node(AST_VarDef, sym, {
name: sym,
- value: arg ? arg.clone(true) : make_node(AST_Undefined, self)
+ value: self.args[i] || make_node(AST_Undefined, self)
});
})
}));
}
if (self.args.length > exp.argnames.length) {
fn.body.push(make_node(AST_SimpleStatement, self, {
- body: make_sequence(self, self.args.slice(exp.argnames.length)).clone(true)
+ body: make_sequence(self, self.args.slice(exp.argnames.length))
}));
}
fn.body.push(make_node(AST_Return, self, {
@@ -3316,6 +3315,7 @@ merge(Compressor.prototype, {
continue;
}
var parent = null, field;
+ expressions[j] = cdr = cdr.clone();
while (true) {
if (cdr.equivalent_to(left)) {
var car = expressions[i];
@@ -3352,7 +3352,7 @@ merge(Compressor.prototype, {
break;
}
parent = cdr;
- cdr = cdr[field];
+ cdr = cdr[field] = cdr[field].clone();
}
}
end = i;