mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
GH-113710: Fix optimization of globals using _CHECK_FUNCTION
(GH-116460)
This commit is contained in:
parent
0b647141d5
commit
0003285c8d
3 changed files with 16 additions and 10 deletions
5
Python/executor_cases.c.h
generated
5
Python/executor_cases.c.h
generated
|
@ -3829,8 +3829,9 @@
|
|||
}
|
||||
|
||||
case _CHECK_FUNCTION: {
|
||||
PyObject *func = (PyObject *)CURRENT_OPERAND();
|
||||
if (frame->f_funcobj != func) goto deoptimize;
|
||||
uint32_t func_version = (uint32_t)CURRENT_OPERAND();
|
||||
assert(PyFunction_Check(frame->f_funcobj));
|
||||
if (((PyFunctionObject *)frame->f_funcobj)->func_version != func_version) goto deoptimize;
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue