diff options
author | Alon Zakai <alonzakai@gmail.com> | 2012-11-27 10:12:03 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2012-11-27 10:12:03 -0800 |
commit | 41e9abe1bb4d493be4e1ea5bace4996e7c532ad5 (patch) | |
tree | ccf826080302cceb958289e338aac0735f390c16 | |
parent | 7b762f571bc9b52f3e7ed3f18e960fb155a91177 (diff) |
always use names for aliases
-rw-r--r-- | src/parseTools.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/parseTools.js b/src/parseTools.js index 5770a0d7..64fd0f91 100644 --- a/src/parseTools.js +++ b/src/parseTools.js @@ -357,12 +357,12 @@ function hasVarArgs(params) { } function makeGlobalDef(ident) { - if (!NAMED_GLOBALS) return ''; + if (!NAMED_GLOBALS && !Variables.globals[ident].alias) return ''; return 'var ' + ident + ';'; // TODO: add option for namespacing or offsetting to allow reducing the number of globals } function makeGlobalUse(ident) { - if (!NAMED_GLOBALS) { + if (!NAMED_GLOBALS && !Variables.globals[ident].alias) { if (!(ident in Variables.indexedGlobals)) { Variables.indexedGlobals[ident] = Variables.nextIndexedOffset; Variables.nextIndexedOffset += Runtime.alignMemory(calcAllocatedSize(Variables.globals[ident].type)); |