diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-06-19 15:08:10 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-06-19 15:20:54 -0700 |
commit | ea9efe32c9cc66bcbbdb15a1c33bf10dfbe821c5 (patch) | |
tree | 42eca8799db750aa01166d2c6640baed1db20d94 /src/parseTools.js | |
parent | e4f8c8184058d8d621d8f3ac007a0d1a55980832 (diff) |
keep |0 on function calls, allow other bitwise ops on heap accesses etc.
Diffstat (limited to 'src/parseTools.js')
-rw-r--r-- | src/parseTools.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/parseTools.js b/src/parseTools.js index 687faaa8..d54480c7 100644 --- a/src/parseTools.js +++ b/src/parseTools.js @@ -1383,7 +1383,7 @@ function makeCopyValues(dest, src, num, type, modifier, align, sep) { if (!isNumber(num)) num = stripCorrections(num); if (!isNumber(align)) align = stripCorrections(align); if (!isNumber(num) || (parseInt(num)/align >= UNROLL_LOOP_MAX)) { - return '_memcpy(' + dest + ', ' + src + ', ' + num + ')'; + return '(_memcpy(' + dest + ', ' + src + ', ' + num + ')|0)'; } num = parseInt(num); if (ASM_JS) { @@ -1465,7 +1465,7 @@ function getFastValue(a, op, b, type) { if ((isNumber(a) && Math.abs(a) < TWO_TWENTY) || (isNumber(b) && Math.abs(b) < TWO_TWENTY) || (bits < 32 && !ASM_JS)) { return '(((' + a + ')*(' + b + '))&' + ((Math.pow(2, bits)-1)|0) + ')'; // keep a non-eliminatable coercion directly on this } - return 'Math.imul(' + a + ',' + b + ')'; + return '(Math.imul(' + a + ',' + b + ')|0)'; } } else { if (a == '0') { |