Skip to content

Commit 7325b44

Browse files
committed
Fix tier 2 unspecialized iteration over ranges
1 parent 9f688e7 commit 7325b44

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

Python/bytecodes.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3226,9 +3226,8 @@ dummy_func(
32263226
}
32273227

32283228
op(_FOR_ITER_TIER_TWO, (iter, null_or_index -- iter, null_or_index, next)) {
3229-
/* before: [iter]; after: [iter, iter()] *or* [] (and jump over END_FOR.) */
3230-
PyObject *iter_o = PyStackRef_AsPyObjectBorrow(iter);
32313229
EXIT_IF(!PyStackRef_IsNull(null_or_index));
3230+
PyObject *iter_o = PyStackRef_AsPyObjectBorrow(iter);
32323231
PyObject *next_o = (*Py_TYPE(iter_o)->tp_iternext)(iter_o);
32333232
if (next_o == NULL) {
32343233
if (_PyErr_Occurred(tstate)) {

Python/executor_cases.c.h

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)