diff options
Diffstat (limited to 'lib/scope.js')
-rw-r--r-- | lib/scope.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/scope.js b/lib/scope.js index 2c325f68..c3a77746 100644 --- a/lib/scope.js +++ b/lib/scope.js @@ -344,7 +344,7 @@ function next_mangled_name(scope, options, def) { } while (true) { name = base54(++scope.cname); - if (in_use[name] || !is_identifier(name) || options._reserved[name]) continue; + if (in_use[name] || !is_identifier(name) || options.reserved.has[name]) continue; if (!names[name]) break; holes.push(scope.cname); } @@ -387,7 +387,7 @@ function _default_mangler_options(options) { if (!Array.isArray(options.reserved)) options.reserved = []; // Never mangle arguments push_uniq(options.reserved, "arguments"); - options._reserved = makePredicate(options.reserved); + options.reserved.has = makePredicate(options.reserved); return options; } @@ -453,7 +453,7 @@ AST_Toplevel.DEFMETHOD("mangle_names", function(options){ redefined.forEach(mangle); function mangle(def) { - if (options._reserved[def.name]) return; + if (options.reserved.has[def.name]) return; def.mangle(options); } }); @@ -504,7 +504,7 @@ AST_Toplevel.DEFMETHOD("expand_names", function(options) { function rename(def) { if (def.global && options.cache) return; if (def.unmangleable(options)) return; - if (options._reserved[def.name]) return; + if (options.reserved.has[def.name]) return; var d = def.redefined(); def.name = d ? d.name : next_name(); def.orig.forEach(function(sym) { |