diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-03-10 13:59:40 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-03-10 13:59:40 -0700 |
commit | 8be82c04408cab6519d3ed58305465ae97ca9da3 (patch) | |
tree | 8cc33c4bfd17d305ae19fa417d105ab5816c8e2f /src/intertyper.js | |
parent | b1240603040c53bbedb3f2ac08063532a96bcd0e (diff) |
pgo for unused function detection
Diffstat (limited to 'src/intertyper.js')
-rw-r--r-- | src/intertyper.js | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/src/intertyper.js b/src/intertyper.js index 2103ecfa..57e3011d 100644 --- a/src/intertyper.js +++ b/src/intertyper.js @@ -122,16 +122,19 @@ function intertyper(data, sidePass, baseLineNums) { SKIP_STACK_IN_SMALL = 0; } - unparsedBundles.push({ - intertype: 'unparsedFunction', - // We need this early, to know basic function info - ident, params, varargs - ident: toNiceIdent(func.ident), - params: func.params, - returnType: func.returnType, - hasVarArgs: func.hasVarArgs, - lineNum: currFunctionLineNum, - lines: currFunctionLines - }); + var ident = toNiceIdent(func.ident); + if (!(ident in DEAD_FUNCTIONS)) { + unparsedBundles.push({ + intertype: 'unparsedFunction', + // We need this early, to know basic function info - ident, params, varargs + ident: ident, + params: func.params, + returnType: func.returnType, + hasVarArgs: func.hasVarArgs, + lineNum: currFunctionLineNum, + lines: currFunctionLines + }); + } currFunctionLines = []; } } |