remove attempt to optimize using 'if' statement as the last one in a loop which created far more problems that it fixed

#KT-1978 Fixed
This commit is contained in:
Dmitry Jemerov
2012-06-09 15:14:33 +02:00
parent a061bca524
commit 0a05197454
3 changed files with 17 additions and 8 deletions
@@ -264,10 +264,7 @@ public class ExpressionCodegen extends JetVisitor<StackValue, StackValue> {
Label elseLabel = new Label();
condition.condJump(elseLabel, true, v); // == 0, i.e. false
Label end = continueLabel == null ? new Label() : continueLabel;
if (continueLabel != null)
asmType = Type.VOID_TYPE;
Label end = new Label();
gen(thenExpression, asmType);
@@ -276,10 +273,7 @@ public class ExpressionCodegen extends JetVisitor<StackValue, StackValue> {
gen(elseExpression, asmType);
if (end != continueLabel)
v.mark(end);
else
v.goTo(end);
v.mark(end);
return StackValue.onStack(asmType);
}