diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-10-14 12:03:55 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-10-14 12:03:55 -0700 |
commit | 76556a057ab338dbcebf2e7f411dd5bad8d2acc9 (patch) | |
tree | 7a6d7e48b95ff9448facdb35fffbdfe5c6762200 /src | |
parent | c672824a579495ec500f3cdb0ea99cb2d52be59e (diff) |
properly parse ctors fully; fixes #1155
Diffstat (limited to 'src')
-rw-r--r-- | src/intertyper.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/intertyper.js b/src/intertyper.js index 781c8187..94a096f3 100644 --- a/src/intertyper.js +++ b/src/intertyper.js @@ -531,7 +531,9 @@ function intertyper(lines, sidePass, baseLineNums) { if (item.tokens[3].item) { var subTokens = item.tokens[3].item.tokens; splitTokenList(subTokens).forEach(function(segment) { - var ctor = toNiceIdent(segment[1].tokens.slice(-1)[0].text); + var parsed = parseLLVMSegment(segment); + assert(parsed.intertype === 'structvalue'); + var ctor = toNiceIdent(parsed.params[1].ident); 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'; |