aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/intertyper.js7
-rw-r--r--src/jsifier.js4
2 files changed, 8 insertions, 3 deletions
diff --git a/src/intertyper.js b/src/intertyper.js
index 08b40157..98b117ff 100644
--- a/src/intertyper.js
+++ b/src/intertyper.js
@@ -549,7 +549,12 @@ function intertyper(data) {
item['param'+i] = parseLLVMSegment(segments[i-1]);
}
}
- item.type = item.param1.type;
+ if (item.op !== 'select') {
+ item.type = item.param1.type;
+ } else {
+ assert(item.param2.type === item.param3.type);
+ item.type = item.param2.type;
+ }
this.forwardItem(item, 'Reintegrator');
},
});
diff --git a/src/jsifier.js b/src/jsifier.js
index 8662f523..7676cf4b 100644
--- a/src/jsifier.js
+++ b/src/jsifier.js
@@ -440,7 +440,7 @@ function JSify(data) {
case VAR_EMULATED: {
break;
}
- default: print('zz unknown impl: ' + impl);
+ default: throw 'zz unknown impl: ' + impl;
}
if (value)
item.JS += ' = ' + value;
@@ -598,7 +598,7 @@ function JSify(data) {
return ident; // We have the actual value here
}
case VAR_EMULATED: return makeGetValue(ident, null, null, item.type);
- default: return "unknown [load] impl: " + impl;
+ default: throw "unknown [load] impl: " + impl;
}
});
makeFuncLineZyme('extractvalue', function(item) {