diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-04-23 18:22:27 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-04-23 18:22:27 -0700 |
commit | 7bba036d79ee219f46402cd914504adf5a199230 (patch) | |
tree | f6bcd2dcb8b857c4fe63df55ce7740553438da50 /src | |
parent | 4d74114a45901d8b694e1f543b0b8ff6daf10acb (diff) |
coerce output of bitshift*
Diffstat (limited to 'src')
-rw-r--r-- | src/analyzer.js | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/analyzer.js b/src/analyzer.js index 3278139b..7fbdf24d 100644 --- a/src/analyzer.js +++ b/src/analyzer.js @@ -660,10 +660,12 @@ function analyzer(data, sidePass) { assert(PRECISE_I64_MATH, 'Must have precise i64 math for non-constant 64-bit shifts'); Types.preciseI64MathUsed = 1; value.intertype = 'value'; - value.ident = 'var ' + value.assignTo + '$0 = _bitshift64' + value.op[0].toUpperCase() + value.op.substr(1) + '(' + - asmCoercion(sourceElements[0].ident, 'i32') + ',' + - asmCoercion(sourceElements[1].ident, 'i32') + ',' + - asmCoercion(value.params[1].ident + '$0', 'i32') + ');' + + value.ident = 'var ' + value.assignTo + '$0 = ' + + asmCoercion('_bitshift64' + value.op[0].toUpperCase() + value.op.substr(1) + '(' + + asmCoercion(sourceElements[0].ident, 'i32') + ',' + + asmCoercion(sourceElements[1].ident, 'i32') + ',' + + asmCoercion(value.params[1].ident + '$0', 'i32') + ')', 'i32' + ) + ';' + 'var ' + value.assignTo + '$1 = tempRet0;'; value.assignTo = null; i++; |