diff options
author | Alon Zakai <alonzakai@gmail.com> | 2012-12-13 14:43:40 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2012-12-13 14:43:40 -0800 |
commit | 2e55061621e16964e244906c3236797408aee119 (patch) | |
tree | 676342deb4e9562880527556e8dcccd6ee0c637a /src/parseTools.js | |
parent | c4978b6c248bc076850743df2ba6b9a6d9af24bb (diff) |
emit numeric constants for global variables, using our knowledge of the fixed value of GLOBAL_BASE
Diffstat (limited to 'src/parseTools.js')
-rw-r--r-- | src/parseTools.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/parseTools.js b/src/parseTools.js index 1a7746e7..8bd8b796 100644 --- a/src/parseTools.js +++ b/src/parseTools.js @@ -414,7 +414,8 @@ function makeGlobalDef(ident) { } function makeGlobalUse(ident) { - if (!NAMED_GLOBALS && isIndexableGlobal(ident)) return '(' + getFastValue('GLOBAL_BASE', '+', Variables.indexedGlobals[ident]) + ')'; + // We assert on TOTAL_STACK being equal to GLOBAL_BASE + if (!NAMED_GLOBALS && isIndexableGlobal(ident)) return (TOTAL_STACK + Variables.indexedGlobals[ident]).toString(); return ident; } |