diff options
author | Alon Zakai <alonzakai@gmail.com> | 2011-11-27 17:56:15 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2011-11-27 17:56:15 -0800 |
commit | 6c3b08991b7a6ea5d30682dbd3af0d9e9b479811 (patch) | |
tree | 534fee6315dd15fc856ce6f955dbdbd09d559414 | |
parent | feae008076ae51de0de9483ed0b4f6491392a390 (diff) | |
parent | d5248fa0762935dc4410b523479eaee5b0f9578a (diff) |
Merge pull request #128 from bemasc/master
When I64_MODE==1, split each global constant int64 at compile time.
-rw-r--r-- | AUTHORS | 1 | ||||
-rw-r--r-- | src/jsifier.js | 4 |
2 files changed, 3 insertions, 2 deletions
@@ -8,3 +8,4 @@ under the licensing terms detailed in LICENSE. * Jeff Terrace <jterrace@gmail.com> * Benoit Tremblay <benoit.tremblay@frimastudio.com> * Andreas Bergmeier <andreas.bergmeier@gmx.net> +* Ben Schwartz <bens@alum.mit.edu> diff --git a/src/jsifier.js b/src/jsifier.js index 4c233481..d7db2f7c 100644 --- a/src/jsifier.js +++ b/src/jsifier.js @@ -147,11 +147,11 @@ function JSify(data, functionsOnly, givenFunctions, givenGlobalVariables) { var currValue = flatten(values[i]); if (I64_MODE == 1 && typeData.fields[i] == 'i64') { // 'flatten' out the 64-bit value into two 32-bit halves - ret[index++] = currValue + '>>>0'; + ret[index++] = currValue>>>0; ret[index++] = 0; ret[index++] = 0; ret[index++] = 0; - ret[index++] = 'Math.floor(' + currValue + '/4294967296)'; + ret[index++] = Math.floor(currValue/4294967296); ret[index++] = 0; ret[index++] = 0; ret[index++] = 0; |