diff options
author | Alon Zakai <alonzakai@gmail.com> | 2011-11-10 17:31:29 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2011-11-10 17:31:29 -0800 |
commit | 0f6bc429372bf571e1b52a11dfedcd84ceba99cc (patch) | |
tree | afb8d8db79fa4ded0d5d4e8944cf6078ad765d90 /src/parseTools.js | |
parent | fa1544b5cacf6720c25222e7f94bb102670f1837 (diff) |
fix for test_parseInt
Diffstat (limited to 'src/parseTools.js')
-rw-r--r-- | src/parseTools.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/parseTools.js b/src/parseTools.js index 67d87a76..fad414ed 100644 --- a/src/parseTools.js +++ b/src/parseTools.js @@ -533,12 +533,19 @@ function IEEEUnHex(stringy) { function makeI64(low, high) { if (I64_MODE == 1) { return '[' + low + ',' + (high || '0') + ']'; + // FIXME with this? return '[unSign(' + low + ',32),' + (high ? ('unSign(' + high + ',32)') : '0') + ']'; } else { assert(!high); return low; } } +// Splits a number (an integer in a double, possibly > 32 bits) into an I64_MODE 1 i64 value +function splitI64(value) { + assert(I64_MODE == 1); + return makeI64(value + '|0', 'Math.floor(' + value + '/4294967296)'); +} + function makeCopyI64(value) { assert(I64_MODE == 1); |