diff options
author | Alon Zakai <alonzakai@gmail.com> | 2012-05-12 09:37:20 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2012-05-12 09:37:20 -0700 |
commit | b60d5fb0a60a2a95697a8547c6ae3010e97779af (patch) | |
tree | f85e7580593c4c34bc1f02ddb86f4af5628595e8 /src/jsifier.js | |
parent | 725d1a3ab6c3d5d504bc4db81bac36c95deae4f1 (diff) |
simply compiler by always pushing back phis
Diffstat (limited to 'src/jsifier.js')
-rw-r--r-- | src/jsifier.js | 24 |
1 files changed, 2 insertions, 22 deletions
diff --git a/src/jsifier.js b/src/jsifier.js index 89930918..6cbe8b88 100644 --- a/src/jsifier.js +++ b/src/jsifier.js @@ -558,9 +558,6 @@ function JSify(data, functionsOnly, givenFunctions) { if (CLOSURE_ANNOTATIONS) func.JS += '/** @type {number} */'; func.JS += ' var __label__;\n'; } - if (func.needsLastLabel) { - func.JS += ' var __lastLabel__ = null;\n'; - } // Walk function blocks and generate JS function walkBlock(block, indent) { @@ -751,7 +748,7 @@ function JSify(data, functionsOnly, givenFunctions) { makeFuncLineActor('noop', function(item) { return ';'; }); - makeFuncLineActor('var', function(item) { // assigns into phis become simple vars when MICRO_OPTS + makeFuncLineActor('var', function(item) { // assigns into phis become simple vars return 'var ' + item.ident + ';'; }); makeFuncLineActor('store', function(item) { @@ -792,11 +789,8 @@ function JSify(data, functionsOnly, givenFunctions) { return label; } - function makeBranch(label, lastLabel, labelIsVariable) { + function makeBranch(label, lastLabel, labelIsVariable) { // lastLabel is deprecated var pre = ''; - if (!MICRO_OPTS && lastLabel) { - pre = '__lastLabel__ = ' + getLabelId(lastLabel) + '; '; - } if (label[0] == 'B') { assert(!labelIsVariable, 'Cannot handle branches to variables with special branching options'); var parts = label.split('|'); @@ -1064,20 +1058,6 @@ function JSify(data, functionsOnly, givenFunctions) { return RuntimeGenerator.stackAlloc(getFastValue(calcAllocatedSize(item.allocatedType), '*', item.allocatedNum)); } }); - makeFuncLineActor('phi', function(item) { - var params = item.params; - assert(!MICRO_OPTS); - function makeOne(i) { - if (i === params.length-1) { - return finalizeLLVMParameter(params[i].value); - } - return '__lastLabel__ == ' + getLabelId(params[i].label) + ' ? ' + - finalizeLLVMParameter(params[i].value) + ' : (' + makeOne(i+1) + ')'; - } - var ret = makeOne(0); - if (item.postSet) ret += item.postSet; - return ret; - }); makeFuncLineActor('mathop', processMathop); |