diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-07-01 18:03:05 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-07-03 15:31:05 -0700 |
commit | 218696cdd2af0f6a96b7bb506c60c845ab36852f (patch) | |
tree | 2246dc3ba28fe3d6f3afb16efb0a4b068d3160c0 /src/jsifier.js | |
parent | cde6b80d99c6e4fd9eb0b67db929e51f93518b56 (diff) |
add a naming to globals that can be linked and used across modules
Diffstat (limited to 'src/jsifier.js')
-rw-r--r-- | src/jsifier.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/jsifier.js b/src/jsifier.js index dbba8e25..acf0f2ac 100644 --- a/src/jsifier.js +++ b/src/jsifier.js @@ -286,6 +286,11 @@ function JSify(data, functionsOnly, givenFunctions) { allocator = 'ALLOC_NONE'; } + if (ASM_JS && (MAIN_MODULE || SIDE_MODULE) && !item.private_ && !NAMED_GLOBALS && isIndexableGlobal(item.ident)) { + // We need this to be named (and it normally would not be), so that it can be linked to and used from other modules + Variables.globals[item.ident].linkable = 1; + } + if (isBSS(item)) { var length = calcAllocatedSize(item.type); length = Runtime.alignMemory(length); |