diff options
author | Alon Zakai <alonzakai@gmail.com> | 2012-12-13 14:34:09 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2012-12-13 14:34:09 -0800 |
commit | c4978b6c248bc076850743df2ba6b9a6d9af24bb (patch) | |
tree | 91e25daefc24e28a2ed5f5f555bdb0c76020efe5 /src/jsifier.js | |
parent | aa45fda1f29089fffae10909021bf013a175e239 (diff) |
always print out global base, even if not used
Diffstat (limited to 'src/jsifier.js')
-rw-r--r-- | src/jsifier.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/jsifier.js b/src/jsifier.js index 6ad9fae7..5cea1dfa 100644 --- a/src/jsifier.js +++ b/src/jsifier.js @@ -1357,6 +1357,8 @@ function JSify(data, functionsOnly, givenFunctions) { print('var GLOBAL_BASE = STATICTOP; assert(GLOBAL_BASE == STACK_MAX); \n'); print('STATICTOP += ' + Variables.nextIndexedOffset + ';\n'); print('assert(STATICTOP < TOTAL_MEMORY);\n'); + } else { + print('var GLOBAL_BASE = 0;\n'); } } var generated = itemsDict.function.concat(itemsDict.type).concat(itemsDict.GlobalVariableStub).concat(itemsDict.GlobalVariable).concat(itemsDict.GlobalVariablePostSet); |