mirror of
https://github.com/python/cpython.git
synced 2025-11-10 02:21:40 +00:00
GH-121012: Set index to -1 when list iterators become exhausted in tier 2 (GH-121483)
This commit is contained in:
parent
d69529d31c
commit
8ad6067bd4
4 changed files with 20 additions and 3 deletions
7
Python/executor_cases.c.h
generated
7
Python/executor_cases.c.h
generated
|
|
@ -3055,8 +3055,11 @@
|
|||
JUMP_TO_JUMP_TARGET();
|
||||
}
|
||||
if ((size_t)it->it_index >= (size_t)PyList_GET_SIZE(seq)) {
|
||||
UOP_STAT_INC(uopcode, miss);
|
||||
JUMP_TO_JUMP_TARGET();
|
||||
it->it_index = -1;
|
||||
if (1) {
|
||||
UOP_STAT_INC(uopcode, miss);
|
||||
JUMP_TO_JUMP_TARGET();
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue