Skip to content

Commit e413ae5

Browse files
committed
[truffle] Remove placeholder loop control
We need to reintroduce it properly thinking how we will deal with labels.
1 parent cb46cc8 commit e413ae5

File tree

1 file changed

+1
-15
lines changed

1 file changed

+1
-15
lines changed

src/vm/jvm/runtime/org/perl6/nqp/truffle/nodes/control/NQPWhileNode.java

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -56,16 +56,7 @@ public boolean executeRepeating(VirtualFrame frame) {
5656
boolean condResult = toBoolean(condNode.execute(frame));
5757
condResult = isUntil ? !condResult : condResult;
5858
if (condResult) {
59-
try {
60-
bodyNode.executeVoid(frame);
61-
} catch (ContinueException ex) {
62-
// the body might throw a continue control-flow exception
63-
// continue loop invocation
64-
} catch (BreakException ex) {
65-
// the body might throw a break control-flow exception
66-
// break loop invocation by returning false
67-
return false;
68-
}
59+
bodyNode.executeVoid(frame);
6960
return true;
7061
} else {
7162
return false;
@@ -75,9 +66,4 @@ public boolean executeRepeating(VirtualFrame frame) {
7566
@Override
7667
public void executeVoid(VirtualFrame frame) {}
7768
}
78-
79-
// thrown by guest language continue statements
80-
public final class ContinueException extends ControlFlowException {}
81-
// thrown by guest language break statements
82-
public final class BreakException extends ControlFlowException {}
8369
}

0 commit comments

Comments
 (0)