Skip to content

Commit 3a934bf

Browse files
committed
Make slot compatible with FOR_ITER_GEN
1 parent 66c11de commit 3a934bf

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
lines changed

Include/internal/pycore_opcode_metadata.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.

Python/bytecodes.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3764,8 +3764,6 @@ dummy_func(
37643764
next = item;
37653765
}
37663766

3767-
macro(FOR_ITER) = _SPECIALIZE_FOR_ITER + _FOR_ITER;
3768-
37693767
op(_FOR_ITER_TIER_TWO, (iter, null_or_index -- iter, null_or_index, next)) {
37703768
_PyStackRef item = _PyForIter_VirtualIteratorNext(tstate, frame, iter, &null_or_index);
37713769
if (!PyStackRef_IsValid(item)) {
@@ -3804,7 +3802,7 @@ dummy_func(
38043802
}
38053803

38063804

3807-
macro(FOR_ITER) = _SPECIALIZE_FOR_ITER + _RECORD_NOS_TYPE + _FOR_ITER;
3805+
macro(FOR_ITER) = _SPECIALIZE_FOR_ITER + _RECORD_NOS_GEN_FUNC + _RECORD_NOS_TYPE + _FOR_ITER;
38083806

38093807
op(_GUARD_NOS_ITER_VIRTUAL, (iter, null_or_index -- iter, null_or_index)) {
38103808
PyObject *iter_o = PyStackRef_AsPyObjectBorrow(iter);

Python/record_functions.c.h

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)