diff options
author | alon@honor <none@none> | 2010-10-25 19:55:09 -0700 |
---|---|---|
committer | alon@honor <none@none> | 2010-10-25 19:55:09 -0700 |
commit | fcb71c83e999564738683adfd2de8e1a915467ec (patch) | |
tree | bf06856c7a616ea2582fd34b1b9e81c987e3815e /src | |
parent | 9ba7957609f258c36036004b557e139591ef67c1 (diff) |
fix bug with type of |select|
Diffstat (limited to 'src')
-rw-r--r-- | src/intertyper.js | 7 | ||||
-rw-r--r-- | src/jsifier.js | 4 |
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) { |