mirror of
https://github.com/python/cpython.git
synced 2025-08-23 10:16:01 +00:00
GH-114695: Add sys._clear_internal_caches
(GH-115152)
This commit is contained in:
parent
54bde5dcc3
commit
235cacff81
12 changed files with 130 additions and 84 deletions
|
@ -2370,23 +2370,12 @@ dummy_func(
|
|||
CHECK_EVAL_BREAKER();
|
||||
|
||||
PyCodeObject *code = _PyFrame_GetCode(frame);
|
||||
_PyExecutorObject *executor = code->co_executors->executors[oparg & 255];
|
||||
if (executor->vm_data.valid) {
|
||||
Py_INCREF(executor);
|
||||
current_executor = executor;
|
||||
GOTO_TIER_TWO();
|
||||
}
|
||||
else {
|
||||
/* ENTER_EXECUTOR will be the first code unit of the instruction */
|
||||
assert(oparg < 256);
|
||||
code->co_executors->executors[oparg] = NULL;
|
||||
opcode = this_instr->op.code = executor->vm_data.opcode;
|
||||
this_instr->op.arg = executor->vm_data.oparg;
|
||||
oparg = executor->vm_data.oparg;
|
||||
Py_DECREF(executor);
|
||||
next_instr = this_instr;
|
||||
DISPATCH_GOTO();
|
||||
}
|
||||
current_executor = code->co_executors->executors[oparg & 255];
|
||||
assert(current_executor->vm_data.index == INSTR_OFFSET() - 1);
|
||||
assert(current_executor->vm_data.code == code);
|
||||
assert(current_executor->vm_data.valid);
|
||||
Py_INCREF(current_executor);
|
||||
GOTO_TIER_TWO();
|
||||
}
|
||||
|
||||
replaced op(_POP_JUMP_IF_FALSE, (cond -- )) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue