Skip to content

Commit

Permalink
don't mangle names of setters/getters
Browse files Browse the repository at this point in the history
  • Loading branch information
mishoo committed Aug 29, 2012
1 parent 6569e66 commit 48440dc
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/scope.js
Original file line number Diff line number Diff line change
Expand Up @@ -325,9 +325,13 @@ AST_Toplevel.DEFMETHOD("mangle_names", function(){
return true; // don't descend again in TreeWalker
}
if (node instanceof AST_Scope) {
var p = tw.parent();
var is_setget = p instanceof AST_ObjectSetter || p instanceof AST_ObjectGetter;
var a = node.variables;
for (var i in a) if (HOP(a, i)) {
a[i].mangle();
var symbol = a[i];
if (!(is_setget && symbol instanceof AST_SymbolLambda))
symbol.mangle();
}
return;
}
Expand Down

0 comments on commit 48440dc

Please sign in to comment.