aboutsummaryrefslogtreecommitdiff
path: root/tools/js-optimizer.js
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-09-30 12:06:56 -0700
committerAlon Zakai <alonzakai@gmail.com>2013-10-02 17:31:37 -0700
commitdb47cbe4a2e89aa20f74ffcd1556ea753eaab170 (patch)
tree17e040d0a39c4bde247a0f1220ce527bcb88bb8e /tools/js-optimizer.js
parentde3972ed9812e04c777e0c1cefbe2b4284f85610 (diff)
assert on vars being in front of functions straight out of the js compiler
Diffstat (limited to 'tools/js-optimizer.js')
-rw-r--r--tools/js-optimizer.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/js-optimizer.js b/tools/js-optimizer.js
index 59e3919f..7df92c60 100644
--- a/tools/js-optimizer.js
+++ b/tools/js-optimizer.js
@@ -1603,6 +1603,8 @@ function normalizeAsm(func) {
while (i < stats.length) {
traverse(stats[i], function(node, type) {
if (type === 'var') {
+ assert(0, 'should be no vars to fix! ' + JSON.stringify(node));
+ /*
for (var j = 0; j < node[1].length; j++) {
var v = node[1][j];
var name = v[0];
@@ -1617,6 +1619,7 @@ function normalizeAsm(func) {
}
}
unVarify(node[1], node);
+ */
} else if (type === 'call' && node[1][0] === 'function') {
assert(!node[1][1]); // anonymous functions only
data.inlines.push(node[1]);