Skip to content

Commit 940b7c9

Browse files
committed
Incorporate changes from python#128445 into the free-threaded branch of
FOR_ITER_LIST specialization.
1 parent bb495b0 commit 940b7c9

File tree

3 files changed

+8
-18
lines changed

3 files changed

+8
-18
lines changed

Python/bytecodes.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3082,10 +3082,8 @@ dummy_func(
30823082
EXIT_IF(result < 0);
30833083
if (result == 0) {
30843084
it->it_index = -1;
3085-
PyStackRef_CLOSE(iter);
3086-
STACK_SHRINK(1);
3087-
/* Jump forward oparg, then skip following END_FOR and POP_TOP instructions */
3088-
JUMPBY(oparg + 2);
3085+
/* Jump forward oparg, then skip following END_FOR instruction */
3086+
JUMPBY(oparg + 1);
30893087
DISPATCH();
30903088
}
30913089
it->it_index++;

Python/executor_cases.c.h

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

Python/generated_cases.c.h

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

0 commit comments

Comments
 (0)