GH-118095: Add dynamic exit support and FOR_ITER_GEN support to tier 2 (GH-118279)

This commit is contained in:
Mark Shannon
2024-04-26 18:08:50 +01:00
committed by GitHub
parent 63add11704
commit 3e06c7f719
12 changed files with 315 additions and 139 deletions

View File

@@ -1072,9 +1072,13 @@ jump_to_jump_target:
next_uop = current_executor->trace + target;
goto tier2_dispatch;
exit_to_tier1_dynamic:
next_instr = frame->instr_ptr;
goto goto_to_tier1;
exit_to_tier1:
assert(next_uop[-1].format == UOP_FORMAT_TARGET);
next_instr = next_uop[-1].target + _PyCode_CODE(_PyFrame_GetCode(frame));
goto_to_tier1:
#ifdef Py_DEBUG
if (lltrace >= 2) {
printf("DEOPT: [UOp ");