diff options
author | Jez Ng <me@jezng.com> | 2013-06-21 16:01:38 -0700 |
---|---|---|
committer | Jez Ng <me@jezng.com> | 2013-06-22 01:23:22 -0700 |
commit | 88feddf045882bbddd29d9286eae4e6a9086e286 (patch) | |
tree | ce60c87bf58117ff6e4d3e092c394da255762a57 /tools/js-optimizer.js | |
parent | d50e7b4f7de07df53f820051dac85e79f8aa6e84 (diff) |
Get test_source_map passing again.
Diffstat (limited to 'tools/js-optimizer.js')
-rw-r--r-- | tools/js-optimizer.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/js-optimizer.js b/tools/js-optimizer.js index 07092513..94c10ebc 100644 --- a/tools/js-optimizer.js +++ b/tools/js-optimizer.js @@ -442,7 +442,9 @@ function simplifyExpressionsPre(ast) { traverse(ast, function process(node, type, stack) { if (type == 'binary' && node[1] == '|') { if (node[2][0] == 'num' && node[3][0] == 'num') { - return ['num', node[2][1] | node[3][1]]; + // pass node[2][0] instead of 'num' because it might be a token + // object with line numbers attached. + return [node[2][0], node[2][1] | node[3][1]]; } else if (jsonCompare(node[2], ZERO) || jsonCompare(node[3], ZERO)) { // We might be able to remove this correction for (var i = stack.length-1; i >= 0; i--) { |