Permalink
Browse files

Merge branch 'master' of https://github.com/cadorn/uglify-js into cad…

…orn-master
  • Loading branch information...
mishoo committed Feb 19, 2011
2 parents 15604c4 + 5eaa12f commit 57ee9e7ccaa159eec6afbfa3cef41f5e94b9b0e0
Showing with 7 additions and 1 deletion.
  1. +4 −0 .gitignore
  2. +3 −1 lib/process.js
View
@@ -0,0 +1,4 @@
+.DS_Store
+.tmp*~
+*.local.*
+.pinf-*
View
@@ -457,11 +457,13 @@ function ast_add_scope(ast) {
/* -----[ mangle names ]----- */
-function ast_mangle(ast, do_toplevel) {
+function ast_mangle(ast, do_toplevel, options) {
var w = ast_walker(), walk = w.walk, scope;
+ options = options || {};
function get_mangled(name, newMangle) {
if (!do_toplevel && !scope.parent) return name; // don't mangle toplevel
+ if (options.reservedNames && options.reservedNames.indexOf(name)!=-1) return name;
return scope.get_mangled(name, newMangle);
};

0 comments on commit 57ee9e7

Please sign in to comment.