aboutsummaryrefslogtreecommitdiff
path: root/tools/js-optimizer.js
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-06-27 11:11:53 -0700
committerAlon Zakai <alonzakai@gmail.com>2013-06-27 11:11:53 -0700
commit91920dc8cbbfe3a055489a3f26b70d4119f6061d (patch)
treeb1265dc8b05c1dc3d3a214c71a04de23999fd6a7 /tools/js-optimizer.js
parent6fe62c15394b2656393771b110f7b93f4db2c80b (diff)
do not collapse & inside a FUNCTION_TABLE call, we need the mask
Diffstat (limited to 'tools/js-optimizer.js')
-rw-r--r--tools/js-optimizer.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/js-optimizer.js b/tools/js-optimizer.js
index 151e573a..4829fec8 100644
--- a/tools/js-optimizer.js
+++ b/tools/js-optimizer.js
@@ -584,6 +584,8 @@ function simplifyExpressionsPre(ast) {
node[3] = value[2];
}
}
+ } else if (type == 'sub' && node[1][0] == 'name' && /^FUNCTION_TABLE.*/.exec(node[1][1])) {
+ return null; // do not traverse subchildren here, we should not collapse 55 & 126. TODO: optimize this into a nonvirtual call (also because we lose some other opts here)!
}
});