mirror of
https://github.com/python/cpython.git
synced 2025-08-24 10:45:53 +00:00
GH-113710: Improve _SET_IP
and _CHECK_VALIDITY
(GH-115248)
This commit is contained in:
parent
de07941729
commit
681778c56a
7 changed files with 79 additions and 35 deletions
|
@ -4037,10 +4037,9 @@ dummy_func(
|
|||
CHECK_EVAL_BREAKER();
|
||||
}
|
||||
|
||||
op(_SET_IP, (--)) {
|
||||
op(_SET_IP, (instr_ptr/4 --)) {
|
||||
TIER_TWO_ONLY
|
||||
// TODO: Put the code pointer in `operand` to avoid indirection via `frame`
|
||||
frame->instr_ptr = _PyCode_CODE(_PyFrame_GetCode(frame)) + oparg;
|
||||
frame->instr_ptr = (_Py_CODEUNIT *)instr_ptr;
|
||||
}
|
||||
|
||||
op(_SAVE_RETURN_OFFSET, (--)) {
|
||||
|
@ -4100,6 +4099,11 @@ dummy_func(
|
|||
exe->count++;
|
||||
}
|
||||
|
||||
op(_CHECK_VALIDITY_AND_SET_IP, (instr_ptr/4 --)) {
|
||||
TIER_TWO_ONLY
|
||||
DEOPT_IF(!current_executor->vm_data.valid);
|
||||
frame->instr_ptr = (_Py_CODEUNIT *)instr_ptr;
|
||||
}
|
||||
|
||||
// END BYTECODES //
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue