diff options
Diffstat (limited to 'tools/js-optimizer.js')
| -rw-r--r-- | tools/js-optimizer.js | 5 | 
1 files changed, 4 insertions, 1 deletions
| diff --git a/tools/js-optimizer.js b/tools/js-optimizer.js index 7d72b7b8..e61317af 100644 --- a/tools/js-optimizer.js +++ b/tools/js-optimizer.js @@ -801,7 +801,10 @@ function simplifyExpressions(ast) {  //  HEAP[x >> 2]  // very often. We can in some cases do the shift on the variable itself when it is set,  // to greatly reduce the number of shift operations. -// TODO: when shifting a variable, if there are other uses, keep an unshifted version too, to prevent slowdowns? +// XXX this optimization is deprecated and currently invalid: does not handle overflows +//     or non-aligned (round numbers, x >> 2 is a multiple of 4). Both are ok to assume +//     for pointers (undefined behavior otherwise), but invalid in general, and we do +//     no sufficiently-well distinguish the cases.  function optimizeShiftsInternal(ast, conservative) {    var MAX_SHIFTS = 3;    traverseGeneratedFunctions(ast, function(fun) { | 
