Skip to content

Commit af9ea57

Browse files
Remove dynamic exit for _FOR_ITER_TIER_TWO
1 parent 92cc140 commit af9ea57

File tree

4 files changed

+3
-9
lines changed

4 files changed

+3
-9
lines changed

Include/internal/pycore_uop_metadata.h

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Python/bytecodes.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3251,8 +3251,7 @@ dummy_func(
32513251
ERROR_NO_POP();
32523252
}
32533253
/* iterator ended normally */
3254-
/* This just sets the IP to what it expects (see normal _FOR_ITER) */
3255-
frame->instr_ptr += (oparg + 2 + INLINE_CACHE_ENTRIES_FOR_ITER);
3254+
/* The translator sets the deopt target just past the matching END_FOR */
32563255
EXIT_IF(true);
32573256
}
32583257
next = item;

Python/executor_cases.c.h

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

Python/optimizer.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1075,10 +1075,7 @@ prepare_for_execution(_PyUOpInstruction *buffer, int length)
10751075
}
10761076
int32_t jump_target = target;
10771077
bool unique_target = false;
1078-
if (opcode == _FOR_ITER_TIER_TWO) {
1079-
exit_op = _DYNAMIC_EXIT;
1080-
}
1081-
else if (
1078+
if (
10821079
opcode == _GUARD_IP__PUSH_FRAME ||
10831080
opcode == _GUARD_IP_RETURN_VALUE ||
10841081
opcode == _GUARD_IP_YIELD_VALUE ||

0 commit comments

Comments
 (0)