From 48440dc250d0a8b72a8064fa97760fe9962f7511 Mon Sep 17 00:00:00 2001 From: Mihai Bazon Date: Wed, 29 Aug 2012 19:26:48 +0300 Subject: don't mangle names of setters/getters --- lib/scope.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lib/scope.js') diff --git a/lib/scope.js b/lib/scope.js index 56896709..9c2f8530 100644 --- a/lib/scope.js +++ b/lib/scope.js @@ -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; } -- cgit v1.2.3