aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2011-06-12 14:28:25 -0700
committerAlon Zakai <alonzakai@gmail.com>2011-06-12 14:28:25 -0700
commita13ef725c7e4f55589e9e0929e8d0b817ba5ec04 (patch)
tree764401e45e7042098bfc49a0d545b9483cb6c699
parentbc1a69c5ec2c73145543ade2eee574ce87593013 (diff)
revert c24c10ea77e612937f1d3e36b5909ada62587b76
-rw-r--r--src/jsifier.js7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/jsifier.js b/src/jsifier.js
index 6de7ecf4..297af69e 100644
--- a/src/jsifier.js
+++ b/src/jsifier.js
@@ -390,10 +390,9 @@ function JSify(data, functionsOnly, givenFunctions, givenGlobalVariables) {
first = false;
});
} else {
- block.entryLabels.forEach(function(entryLabel, i) {
- var last = i === block.entryLabels.length-1;
- ret += indent + multipleIdent + (first ? '' : 'else ') + // add the final |if| only when we have assertions (we have a final else there)
- ((!last || ASSERTIONS) ? 'if (__label__ == ' + getLabelId(entryLabel.ident) + ')' : '') + ' {\n';
+ // TODO: Find out cases where the final if is not needed - where we know we must be in a specific label at that point
+ block.entryLabels.forEach(function(entryLabel) {
+ ret += indent + multipleIdent + (first ? '' : 'else ') + 'if (__label__ == ' + getLabelId(entryLabel.ident) + ') {\n';
ret += walkBlock(entryLabel.block, indent + ' ' + multipleIdent);
ret += indent + multipleIdent + '}\n';
first = false;