Skip to content

Commit 33678b6

Browse files
committed
Revert "always peel the first iteration (like PyPy)"
This reverts commit 9c3eeddf3713916a4a4358dbb4cc8dc66cba3722.
1 parent a8f888c commit 33678b6

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/nodes/control/ForNode.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -185,10 +185,7 @@ public void executeVoid(VirtualFrame frame) {
185185
}
186186
frame.setObject(iteratorSlot, iterator.execute(frame));
187187
try {
188-
if (((ForRepeatingNode) loopNode.getRepeatingNode()).executeRepeating(frame)) {
189-
// manually peel the first iteration
190-
loopNode.executeLoop(frame);
191-
}
188+
loopNode.executeLoop(frame);
192189
} finally {
193190
frame.setObject(iteratorSlot, null);
194191
}

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/nodes/control/WhileNode.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,6 @@ public CastToBooleanNode getCondition() {
8181

8282
@Override
8383
public void executeVoid(VirtualFrame frame) {
84-
if (((WhileRepeatingNode) loopNode.getRepeatingNode()).executeRepeating(frame)) {
85-
// manually peel the first iteration
86-
loopNode.executeLoop(frame);
87-
}
84+
loopNode.executeLoop(frame);
8885
}
8986
}

0 commit comments

Comments
 (0)