GH-118095: Unify the behavior of tier 2 FOR_ITER branch micro-ops (GH-118420)

* Target _FOR_ITER_TIER_TWO at POP_TOP following the matching END_FOR

* Modify _GUARD_NOT_EXHAUSTED_RANGE, _GUARD_NOT_EXHAUSTED_LIST and _GUARD_NOT_EXHAUSTED_TUPLE so that they also target the POP_TOP following the matching END_FOR
This commit is contained in:
Mark Shannon 2024-05-02 16:17:59 +01:00 committed by GitHub
parent 9789440de3
commit 72867c962c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 56 additions and 21 deletions

View file

@ -2664,9 +2664,7 @@
_PyErr_Clear(tstate);
}
/* iterator ended normally */
Py_DECREF(iter);
STACK_SHRINK(1);
/* The translator sets the deopt target just past END_FOR */
/* The translator sets the deopt target just past the matching END_FOR */
if (true) {
UOP_STAT_INC(uopcode, miss);
JUMP_TO_JUMP_TARGET();