mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
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.
This commit is contained in:
parent
0cfdd6e3d1
commit
4bbb367ba6
6 changed files with 118 additions and 98 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue