aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Python/generated_cases.c.h
diff options
context:
space:
mode:
authorBrandt Bucher <brandtbucher@microsoft.com>2024-02-12 01:04:36 -0800
committerGitHub <noreply@github.com>2024-02-12 09:04:36 +0000
commit235cacff81931a68e8c400bb3919ae6e55462fb5 (patch)
tree2f4c7d4a8d0f2e0bbdad8e28560609a2aab27bf5 /Python/generated_cases.c.h
parent54bde5dcc3c04c4ddebcc9df2904ab325fa0b486 (diff)
downloadcpython-235cacff81931a68e8c400bb3919ae6e55462fb5.tar.gz
cpython-235cacff81931a68e8c400bb3919ae6e55462fb5.zip
GH-114695: Add `sys._clear_internal_caches` (GH-115152)
Diffstat (limited to 'Python/generated_cases.c.h')
-rw-r--r--Python/generated_cases.c.h25
1 files changed, 7 insertions, 18 deletions
diff --git a/Python/generated_cases.c.h b/Python/generated_cases.c.h
index 16f1db30620..e5244147d49 100644
--- a/Python/generated_cases.c.h
+++ b/Python/generated_cases.c.h
@@ -2363,29 +2363,18 @@
}
TARGET(ENTER_EXECUTOR) {
- _Py_CODEUNIT *this_instr = frame->instr_ptr = next_instr;
+ frame->instr_ptr = next_instr;
next_instr += 1;
INSTRUCTION_STATS(ENTER_EXECUTOR);
TIER_ONE_ONLY
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();
DISPATCH();
}