Permalink
Browse files

don't mangle names of setters/getters

  • Loading branch information...
1 parent 6569e66 commit 48440dc250d0a8b72a8064fa97760fe9962f7511 @mishoo mishoo committed Aug 29, 2012
Showing with 5 additions and 1 deletion.
  1. +5 −1 lib/scope.js
View
@@ -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;
}

0 comments on commit 48440dc

Please sign in to comment.