aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-01-18 19:16:50 -0800
committerAlon Zakai <alonzakai@gmail.com>2013-01-18 19:16:50 -0800
commit09642e9965d7fce59d76b36346e99083ff0d9768 (patch)
tree6d80434042153bac21b06b2c647b5d9166b075c9 /src
parent0c5d32bbb72f7cc744edb242b352dfc7c6639142 (diff)
fix mathop param types detection
Diffstat (limited to 'src')
-rw-r--r--src/intertyper.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/intertyper.js b/src/intertyper.js
index 42dee437..c1a98354 100644
--- a/src/intertyper.js
+++ b/src/intertyper.js
@@ -834,15 +834,17 @@ function intertyper(data, sidePass, baseLineNums) {
item.params[i-1] = parseLLVMSegment(segments[i-1]);
}
}
+ var setParamTypes = true;
if (item.op === 'select') {
assert(item.params[1].type === item.params[2].type);
item.type = item.params[1].type;
} else if (item.op in LLVM.CONVERSIONS) {
item.type = item.params[1].type;
+ setParamTypes = false;
} else {
item.type = item.params[0].type;
}
- if (item.op != 'ptrtoint') {
+ if (setParamTypes) {
for (var i = 0; i < 4; i++) {
if (item.params[i]) item.params[i].type = item.type; // All params have the same type, normally
}