diff options
| author | Mark Shannon <mark@hotpy.org> | 2024-05-02 15:17:59 (GMT) |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-05-02 15:17:59 (GMT) |
| commit | 72867c962cc59c6d56805f86530696bea6beb039 (patch) | |
| tree | 239f9333f2e1f355387f41ce2443a786de04afc9 /Python/bytecodes.c | |
| parent | 9789440de387219bb7677fe0d66860aa8c9deb02 (diff) | |
| download | cpython-72867c962cc59c6d56805f86530696bea6beb039.zip cpython-72867c962cc59c6d56805f86530696bea6beb039.tar.gz cpython-72867c962cc59c6d56805f86530696bea6beb039.tar.bz2 | |
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
Diffstat (limited to 'Python/bytecodes.c')
| -rw-r--r-- | Python/bytecodes.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/Python/bytecodes.c b/Python/bytecodes.c index b1be40d..9769cfe 100644 --- a/Python/bytecodes.c +++ b/Python/bytecodes.c @@ -2610,9 +2610,7 @@ dummy_func( _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 */ DEOPT_IF(true); } // Common case: no jump, leave it to the code generator |
