diff options
Diffstat (limited to 'tools/js-optimizer.js')
-rw-r--r-- | tools/js-optimizer.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/js-optimizer.js b/tools/js-optimizer.js index 151e573a..be5accbc 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)! } }); @@ -2035,7 +2037,6 @@ function eliminate(ast, memSafe) { // examine body and note locals var hasSwitch = false; traverse(func, function(node, type) { - if (debug && type) type = type.toString(); if (type === 'var') { var node1 = node[1]; for (var i = 0; i < node1.length; i++) { @@ -2645,7 +2646,6 @@ function eliminate(ast, memSafe) { var has_num = false; var fail = false; traverse(node, function(subNode, subType) { - if (debug && subType) subType = subType.toString(); if (subType === 'binary') { if (subNode[1] !== '+') { fail = true; |