diff options
author | Alon Zakai <alonzakai@gmail.com> | 2012-11-29 15:05:41 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2012-12-07 14:23:20 -0800 |
commit | e944bb4580c4105a6653bcba4c0832d85f389843 (patch) | |
tree | aeab5a5779166d663ce524303342c78ccf76cc5c /src/intertyper.js | |
parent | df5d5b01426005ef577f5e7ddd9754804e53613c (diff) |
export global constructors from asm.js and get them dynamically in the outside scope
Diffstat (limited to 'src/intertyper.js')
-rw-r--r-- | src/intertyper.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/intertyper.js b/src/intertyper.js index e727cc8b..f63e0982 100644 --- a/src/intertyper.js +++ b/src/intertyper.js @@ -521,7 +521,12 @@ function intertyper(data, sidePass, baseLineNums) { if (item.tokens[3].item) { var subTokens = item.tokens[3].item.tokens; splitTokenList(subTokens).forEach(function(segment) { - ret.ctors.push(segment[1].tokens.slice(-1)[0].text); + var ctor = toNiceIdent(segment[1].tokens.slice(-1)[0].text); + ret.ctors.push(ctor); + if (ASM_JS) { // must export the global constructors from asm.js module, so mark as implemented and exported + Functions.implementedFunctions[ctor] = 'v'; + EXPORTED_FUNCTIONS[ctor] = 1; + } }); } } else if (!external) { |