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.
AST_Toplevel.DEFMETHOD("mangle_names", function(options){
options = defaults(options, {
- sort : false,
except : []
});
// We only need to mangle declaration nodes. Special logic wired
}
});
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) });
});