diff options
author | Alon Zakai <alonzakai@gmail.com> | 2011-12-15 15:38:26 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2011-12-15 17:07:31 -0800 |
commit | 6259358a5a125b64a90651ab1ee535e919339b68 (patch) | |
tree | cbc28b6b1abba72c488531eeb2269f437b14fbd4 /src/parseTools.js | |
parent | ad34dff9ae485eafab64d68a61a193f82f3b1988 (diff) |
rewrite variable analysis code. eliminate unused variables without side effects, and improve nativization logic.
Diffstat (limited to 'src/parseTools.js')
-rw-r--r-- | src/parseTools.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/parseTools.js b/src/parseTools.js index d0193a12..0b9d8f2f 100644 --- a/src/parseTools.js +++ b/src/parseTools.js @@ -410,7 +410,7 @@ function parseLLVMSegment(segment) { Types.needAnalysis[type] = 0; return { intertype: 'structvalue', - values: splitTokenList(segment[1].tokens).map(parseLLVMSegment), + params: splitTokenList(segment[1].tokens).map(parseLLVMSegment), type: type }; } else if (segment[0].text in PARSABLE_LLVM_FUNCTIONS) { @@ -1458,7 +1458,7 @@ function finalizeLLVMParameter(param, noIndexizeFunctions) { } ret = parseNumerical(ret); } else if (param.intertype == 'structvalue') { - ret = makeLLVMStruct(param.values.map(function(value) { return finalizeLLVMParameter(value, noIndexizeFunctions) })); + ret = makeLLVMStruct(param.params.map(function(value) { return finalizeLLVMParameter(value, noIndexizeFunctions) })); } else if (param.intertype === 'blockaddress') { return finalizeBlockAddress(param); } else if (param.intertype === 'type') { @@ -1793,7 +1793,7 @@ function processMathop(item) { // Walks through some intertype data, calling a function at every item. If // the function returns true, will stop the walk. -// TODO: Use this in analyzer, possibly also in jsifier +// TODO: Use this more in analyzer, possibly also in jsifier function walkInterdata(item, pre, post, obj) { if (!item || !item.intertype) return false; if (pre && pre(item, obj)) return true; |