aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-03-09 15:47:41 -0800
committerAlon Zakai <alonzakai@gmail.com>2013-03-09 15:47:41 -0800
commit0ecad78d552f20c7dfc454489df3eba61361fa06 (patch)
tree0dc2e7c295b1721b161e47a25d515263f92be60c /tools
parent4c95c34ca8166f49f995ea8fe082cd0aaa70d839 (diff)
remove limitations on minified names
Diffstat (limited to 'tools')
-rw-r--r--tools/js-optimizer.js2
-rw-r--r--tools/js_optimizer.py2
2 files changed, 1 insertions, 3 deletions
diff --git a/tools/js-optimizer.js b/tools/js-optimizer.js
index 5b2e6188..2b9064b2 100644
--- a/tools/js-optimizer.js
+++ b/tools/js-optimizer.js
@@ -1454,7 +1454,7 @@ function registerize(ast) {
var name = node[1];
var minified = minifierInfo.globals[name];
if (minified) {
- assert(!localVars[name]); // locals must not shadow globals, or else we don't know which is which
+ assert(!localVars[name], name); // locals must not shadow globals, or else we don't know which is which
if (localVars[minified]) {
// trying to minify a global into a name used locally. rename all the locals
var newName = '$_newLocal_' + (nextLocal++);
diff --git a/tools/js_optimizer.py b/tools/js_optimizer.py
index 94883a90..98b34684 100644
--- a/tools/js_optimizer.py
+++ b/tools/js_optimizer.py
@@ -47,14 +47,12 @@ class Minifier:
for a in init_possibles:
for b in later_possibles:
if len(self.names) >= MAX_NAMES: break
- if a in 'ida' and b in string.digits: continue # TODO: minify registerize names
curr = a + b
if curr not in INVALID_2: self.names.append(curr)
for a in init_possibles:
for b in later_possibles:
for c in later_possibles:
if len(self.names) >= MAX_NAMES: break
- if a in 'ida' and b in string.digits and c in string.digits: continue # TODO: minify registerize names
curr = a + b + c
if curr not in INVALID_3: self.names.append(curr)
#print >> sys.stderr, self.names