@@ -285,21 +285,16 @@ public StackValue visitWhileExpression(JetWhileExpression expression, StackValue
285
285
Label condition = new Label ();
286
286
v .mark (condition );
287
287
288
- Label end = continueLabel != null ? continueLabel : new Label ();
288
+ Label end = new Label ();
289
289
blockStackElements .push (new LoopBlockStackElement (end , condition , targetLabel (expression )));
290
290
291
- Label savedContinueLabel = continueLabel ;
292
- continueLabel = condition ;
293
-
294
291
final StackValue conditionValue = gen (expression .getCondition ());
295
292
conditionValue .condJump (end , true , v );
296
293
297
294
gen (expression .getBody (), Type .VOID_TYPE );
298
295
v .goTo (condition );
299
296
300
- continueLabel = savedContinueLabel ;
301
- if (end != continueLabel )
302
- v .mark (end );
297
+ v .mark (end );
303
298
304
299
blockStackElements .pop ();
305
300
@@ -683,14 +678,13 @@ else if (stackElement instanceof LoopBlockStackElement) {
683
678
}
684
679
685
680
private StackValue generateSingleBranchIf (StackValue condition , JetExpression expression , boolean inverse ) {
686
- Label end = continueLabel != null ? continueLabel : new Label ();
681
+ Label end = new Label ();
687
682
688
683
condition .condJump (end , inverse , v );
689
684
690
685
gen (expression , Type .VOID_TYPE );
691
686
692
- if (continueLabel != end )
693
- v .mark (end );
687
+ v .mark (end );
694
688
return StackValue .none ();
695
689
}
696
690
@@ -849,8 +843,6 @@ public StackValue visitObjectLiteralExpression(JetObjectLiteralExpression expres
849
843
return StackValue .onStack (closure .getClassname ().getAsmType ());
850
844
}
851
845
852
- private Label continueLabel ;
853
-
854
846
private StackValue generateBlock (List <JetElement > statements ) {
855
847
Label blockStart = new Label ();
856
848
v .mark (blockStart );
@@ -880,12 +872,9 @@ private StackValue generateBlock(List<JetElement> statements) {
880
872
}
881
873
882
874
StackValue answer = StackValue .none ();
883
- Label savedContinueLabel = continueLabel ;
884
- continueLabel = null ;
885
875
for (int i = 0 , statementsSize = statements .size (); i < statementsSize ; i ++) {
886
876
JetElement statement = statements .get (i );
887
877
if (i == statements .size () - 1 /*&& statement instanceof JetExpression && !bindingContext.get(BindingContext.STATEMENT, statement)*/ ) {
888
- continueLabel = savedContinueLabel ;
889
878
answer = gen (statement );
890
879
}
891
880
else {
@@ -2709,9 +2698,6 @@ public StackValue visitTryExpression(JetTryExpression expression, StackValue rec
2709
2698
The "returned" value of try expression with no finally is either the last expression in the try block or the last expression in the catch block
2710
2699
(or blocks).
2711
2700
*/
2712
- Label savedContinueLabel = continueLabel ;
2713
- continueLabel = null ;
2714
-
2715
2701
JetFinallySection finallyBlock = expression .getFinallyBlock ();
2716
2702
if (finallyBlock != null ) {
2717
2703
blockStackElements .push (new FinallyBlockStackElement (expression ));
@@ -2771,8 +2757,6 @@ public StackValue visitTryExpression(JetTryExpression expression, StackValue rec
2771
2757
blockStackElements .pop ();
2772
2758
}
2773
2759
2774
- continueLabel = savedContinueLabel ;
2775
-
2776
2760
return StackValue .onStack (expectedAsmType );
2777
2761
}
2778
2762
0 commit comments