diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-02-22 18:41:37 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-02-22 18:55:13 -0800 |
commit | c00e097d60100c7a562ac25664eb3c25bb9403ae (patch) | |
tree | f724c92e09a6c24c85110a33fc40561a2b0dcbb4 /src/parseTools.js | |
parent | 90710c0c8ee4425c06402cc7831abdee8c519a43 (diff) |
always use Math.imul, with fast polyfill. will be useful for faster 64-bit math
Diffstat (limited to 'src/parseTools.js')
-rw-r--r-- | src/parseTools.js | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/parseTools.js b/src/parseTools.js index 15c2169b..514d74d0 100644 --- a/src/parseTools.js +++ b/src/parseTools.js @@ -1046,10 +1046,8 @@ function asmMultiplyI32(a, b) { if ((isNumber(a) && Math.abs(a) < TWO_TWENTY) || (isNumber(b) && Math.abs(b) < TWO_TWENTY)) { return '(((' + a + ')*(' + b + '))&-1)'; // small enough to emit directly as a multiply } - if (USE_MATH_IMUL) { - return 'Math.imul(' + a + ',' + b + ')'; - } - return '(~~(+((' + a + ')|0) * +((' + b + ')|0)))'; + return 'Math.imul(' + a + ',' + b + ')'; + // non-imul version: return '(~~(+((' + a + ')|0) * +((' + b + ')|0)))'; } function asmFloatToInt(x) { |