diff options
author | Alon Zakai <alonzakai@gmail.com> | 2011-09-07 15:26:23 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2011-09-07 15:26:23 -0700 |
commit | 0a89324b724bf4f29b4b1b25b972c1c5247dc1a3 (patch) | |
tree | 55107904363712090525aa3fce59b35cebaecac8 /src/parseTools.js | |
parent | af88c4ce7135523b90d71812717470d08d472148 (diff) |
improve global alias processing, including sort by dependency. poppler test passes
Diffstat (limited to 'src/parseTools.js')
-rw-r--r-- | src/parseTools.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/parseTools.js b/src/parseTools.js index 70071d04..0e30aa5e 100644 --- a/src/parseTools.js +++ b/src/parseTools.js @@ -979,14 +979,14 @@ function makeGetSlabs(ptr, type, allowMultiple, unsigned) { return []; } -function finalizeLLVMFunctionCall(item) { +function finalizeLLVMFunctionCall(item, noIndexizeFunctions) { switch(item.intertype) { case 'getelementptr': // TODO finalizeLLVMParameter on the ident and the indexes? return makePointer(makeGetSlabs(item.ident, item.type)[0], getGetElementPtrIndexes(item), null, item.type); case 'bitcast': case 'inttoptr': case 'ptrtoint': - return finalizeLLVMParameter(item.params[0]); + return finalizeLLVMParameter(item.params[0], noIndexizeFunctions); case 'icmp': case 'mul': case 'zext': case 'add': case 'sub': case 'div': var temp = { op: item.intertype, @@ -1085,11 +1085,11 @@ function finalizeLLVMParameter(param, noIndexizeFunctions) { } else if (typeof param === 'string') { return toNiceIdentCarefully(param); } else if (param.intertype in PARSABLE_LLVM_FUNCTIONS) { - ret = finalizeLLVMFunctionCall(param); + ret = finalizeLLVMFunctionCall(param, noIndexizeFunctions); } else if (param.intertype == 'value') { ret = parseNumerical(param.ident); } else if (param.intertype == 'structvalue') { - ret = param.values.map(finalizeLLVMParameter); + ret = param.values.map(function(value) { return finalizeLLVMParameter(value, noIndexizeFunctions) }); } else if (param.intertype === 'blockaddress') { return finalizeBlockAddress(param); } else if (param.intertype === 'type') { |