mirror of
https://github.com/python/cpython.git
synced 2026-04-20 02:40:59 +00:00
GH-145668: Add FOR_ITER specialization for virtual iterators. Specialize GET_ITER. (GH-147967)
* Add FOR_ITER_VIRTUAL to specialize FOR_ITER for virtual iterators * Add GET_ITER_SELF to specialize GET_ITER for iterators (including generators) * Add GET_ITER_VIRTUAL to specialize GET_ITER for iterables as virtual iterators * Add new (internal) _tp_iteritem function slot to PyTypeObject * Put limited RESUME at start of genexpr for free-threading. Fix up exception handling in genexpr
This commit is contained in:
parent
0fcf2b72d3
commit
600f4dbd54
37 changed files with 2987 additions and 1534 deletions
|
|
@ -496,8 +496,10 @@ _PyUOp_Replacements[MAX_UOP_ID + 1] = {
|
|||
[_ITER_JUMP_LIST] = _GUARD_NOT_EXHAUSTED_LIST,
|
||||
[_ITER_JUMP_TUPLE] = _GUARD_NOT_EXHAUSTED_TUPLE,
|
||||
[_FOR_ITER] = _FOR_ITER_TIER_TWO,
|
||||
[_FOR_ITER_VIRTUAL] = _FOR_ITER_VIRTUAL_TIER_TWO,
|
||||
[_ITER_NEXT_LIST] = _ITER_NEXT_LIST_TIER_TWO,
|
||||
[_CHECK_PERIODIC_AT_END] = _TIER2_RESUME_CHECK,
|
||||
[_LOAD_BYTECODE] = _NOP,
|
||||
};
|
||||
|
||||
static const uint8_t
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue