Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/cadorn/uglify-js into cad…
Browse files Browse the repository at this point in the history
…orn-master
  • Loading branch information
mishoo committed Feb 19, 2011
2 parents 15604c4 + 5eaa12f commit 57ee9e7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .gitignore
@@ -0,0 +1,4 @@
.DS_Store
.tmp*~
*.local.*
.pinf-*
4 changes: 3 additions & 1 deletion lib/process.js
Expand Up @@ -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);
};

Expand Down

0 comments on commit 57ee9e7

Please sign in to comment.