diff options
author | Mihai Bazon <mihai@bazon.net> | 2012-10-17 15:24:47 +0300 |
---|---|---|
committer | Mihai Bazon <mihai@bazon.net> | 2012-10-17 15:24:47 +0300 |
commit | 8f664585983e4174bb850e3975659127eb99df36 (patch) | |
tree | f61e833c085136bb61e12197df473055593ff919 | |
parent | 6472f9410ec93c4f934643d7fd7ff3edeef6b191 (diff) | |
download | tracifyjs-8f664585983e4174bb850e3975659127eb99df36.tar.gz tracifyjs-8f664585983e4174bb850e3975659127eb99df36.zip |
the `sort` option is broken anyway, removed it
we need to mangle names from outermost to innermost scope; mangling names
from inner scopes before we got to the outer scope won't work correctly,
therefore sorting doesn't make sense.
-rw-r--r-- | lib/scope.js | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/lib/scope.js b/lib/scope.js index eebedfd8..d87a54d8 100644 --- a/lib/scope.js +++ b/lib/scope.js @@ -329,7 +329,6 @@ AST_Symbol.DEFMETHOD("global", function(){ AST_Toplevel.DEFMETHOD("mangle_names", function(options){ options = defaults(options, { - sort : false, except : [] }); // We only need to mangle declaration nodes. Special logic wired @@ -368,11 +367,6 @@ AST_Toplevel.DEFMETHOD("mangle_names", function(options){ } }); this.walk(tw); - - if (options.sort) to_mangle = mergeSort(to_mangle, function(a, b){ - return b.references.length - a.references.length; - }); - to_mangle.forEach(function(def){ def.mangle(options) }); }); |