diff options
author | Alon Zakai <alonzakai@gmail.com> | 2012-04-01 20:23:17 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2012-04-01 20:23:17 -0700 |
commit | 3c4fc418648c3c33dd419f20d7d7cac3238ff5be (patch) | |
tree | 326306e711a5c0dee920cc2e315fec82839482f4 /src/parseTools.js | |
parent | 4401a0b0e47832a94ba54b787795678535273d19 (diff) |
fix parsing of i64 constants in globals, and add working cube2hash testcase
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 c8543963..5ec3b4ed 100644 --- a/src/parseTools.js +++ b/src/parseTools.js @@ -683,16 +683,14 @@ function parseArbitraryInt(str, bits) { return ret; } -function parseI64Constant(str) { - assert(USE_TYPED_ARRAYS == 2); - +function parseI64Constant(str, legalized) { if (!isNumber(str)) { // This is a variable. Copy it, so we do not modify the original return legalizedI64s ? str : makeCopyI64(str); } var parsed = parseArbitraryInt(str, 64); - if (legalizedI64s) return parsed; + if (legalizedI64s || legalized) return parsed; return '[' + parsed[0] + ',' + parsed[1] + ']'; } |