diff options
author | Mihai Bazon <mihai@bazon.net> | 2012-08-29 19:26:48 +0300 |
---|---|---|
committer | Mihai Bazon <mihai@bazon.net> | 2012-08-29 19:26:48 +0300 |
commit | 48440dc250d0a8b72a8064fa97760fe9962f7511 (patch) | |
tree | 25c7e282a67c1b30f6f18458a5df1965f4b84f4b /lib | |
parent | 6569e66bf87e5b170ac01f52b32e66639d09b899 (diff) | |
download | tracifyjs-48440dc250d0a8b72a8064fa97760fe9962f7511.tar.gz tracifyjs-48440dc250d0a8b72a8064fa97760fe9962f7511.zip |
don't mangle names of setters/getters
Diffstat (limited to 'lib')
-rw-r--r-- | lib/scope.js | 6 |
1 files changed, 5 insertions, 1 deletions
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; } |