diff options
author | Mark Shannon <mark@hotpy.org> | 2023-11-15 15:48:58 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-15 15:48:58 (GMT) |
commit | 4bbb367ba65e1df7307f7c6a33afd3c369592188 (patch) | |
tree | f771937bb812896de63e1a4252ee6c3217644690 /Python/ceval.c | |
parent | 0cfdd6e3d17fee8c1c1f4b42b2146abcb43aa34b (diff) | |
download | cpython-4bbb367ba65e1df7307f7c6a33afd3c369592188.zip cpython-4bbb367ba65e1df7307f7c6a33afd3c369592188.tar.gz cpython-4bbb367ba65e1df7307f7c6a33afd3c369592188.tar.bz2 |
GH-111848: Set the IP when de-optimizing (GH-112065)
* Replace jumps with deopts in tier 2
* Fewer special cases of uop names
* Add target field to uop IR
* Remove more redundant SET_IP and _CHECK_VALIDITY micro-ops
* Extend whitelist of non-escaping API functions.
Diffstat (limited to 'Python/ceval.c')
-rw-r--r-- | Python/ceval.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Python/ceval.c b/Python/ceval.c index fe1bf31..d684c72 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -1067,6 +1067,7 @@ deoptimize: UOP_STAT_INC(opcode, miss); frame->return_offset = 0; // Dispatch to frame->instr_ptr _PyFrame_SetStackPointer(frame, stack_pointer); + frame->instr_ptr = next_uop[-1].target + _PyCode_CODE((PyCodeObject *)frame->f_executable); Py_DECREF(current_executor); // Fall through // Jump here from ENTER_EXECUTOR @@ -1077,6 +1078,7 @@ enter_tier_one: // Jump here from _EXIT_TRACE exit_trace: _PyFrame_SetStackPointer(frame, stack_pointer); + frame->instr_ptr = next_uop[-1].target + _PyCode_CODE((PyCodeObject *)frame->f_executable); Py_DECREF(current_executor); OPT_HIST(trace_uop_execution_counter, trace_run_length_hist); goto enter_tier_one; |