aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/compress.js16
1 files changed, 11 insertions, 5 deletions
diff --git a/lib/compress.js b/lib/compress.js
index aff5c643..1ded032b 100644
--- a/lib/compress.js
+++ b/lib/compress.js
@@ -354,10 +354,14 @@ merge(Compressor.prototype, {
// So existing transformation rules can work on them.
node.argnames.forEach(function(arg, i) {
var d = arg.definition();
- d.fixed = function() {
- return iife.args[i] || make_node(AST_Undefined, iife);
- };
- mark(d, true);
+ if (!node.uses_arguments && d.fixed === undefined) {
+ d.fixed = function() {
+ return iife.args[i] || make_node(AST_Undefined, iife);
+ };
+ mark(d, true);
+ } else {
+ d.fixed = false;
+ }
});
}
descend();
@@ -491,7 +495,9 @@ merge(Compressor.prototype, {
function reset_def(def) {
def.escaped = false;
- if (!def.global || def.orig[0] instanceof AST_SymbolConst || compressor.toplevel(def)) {
+ if (def.scope.uses_eval) {
+ def.fixed = false;
+ } else if (!def.global || def.orig[0] instanceof AST_SymbolConst || compressor.toplevel(def)) {
def.fixed = undefined;
} else {
def.fixed = false;