aboutsummaryrefslogtreecommitdiff
path: root/src/jsifier.js
diff options
context:
space:
mode:
authorBenjamin M. Schwartz <bens@alum.mit.edu>2011-11-27 19:32:35 -0500
committerBenjamin M. Schwartz <bens@alum.mit.edu>2011-11-27 20:51:20 -0500
commitd5248fa0762935dc4410b523479eaee5b0f9578a (patch)
tree534fee6315dd15fc856ce6f955dbdbd09d559414 /src/jsifier.js
parentfeae008076ae51de0de9483ed0b4f6491392a390 (diff)
When I64_MODE==1, split each global constant int64 at compile time.
This change allows the generated code to be processed by the closure compiler. Without this change, commit 81f82a6a0dd932344027a408ff7bf905de1d2e52 prevents the closure compiler from running (see http://code.google.com/closure/compiler/docs/error-ref.html#error). This change should also slightly improve startup speed and reduce code size.
Diffstat (limited to 'src/jsifier.js')
-rw-r--r--src/jsifier.js4
1 files changed, 2 insertions, 2 deletions
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;