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
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 315 additions and 139 deletions

View file

@ -87,6 +87,7 @@ _JIT_ENTRY(_PyInterpreterFrame *frame, PyObject **stack_pointer, PyThreadState *
PATCH_VALUE(_PyExecutorObject *, current_executor, _JIT_EXECUTOR)
int oparg;
int uopcode = _JIT_OPCODE;
_Py_CODEUNIT *next_instr;
// Other stuff we need handy:
PATCH_VALUE(uint16_t, _oparg, _JIT_OPARG)
#if SIZEOF_VOID_P == 8
@ -122,6 +123,9 @@ error_tier_two:
exit_to_tier1:
tstate->previous_executor = (PyObject *)current_executor;
GOTO_TIER_ONE(_PyCode_CODE(_PyFrame_GetCode(frame)) + _target);
exit_to_tier1_dynamic:
tstate->previous_executor = (PyObject *)current_executor;
GOTO_TIER_ONE(frame->instr_ptr);
exit_to_trace:
{
_PyExitData *exit = &current_executor->exits[_exit_index];