mirror of
https://github.com/python/cpython.git
synced 2025-08-24 10:45:53 +00:00
GH-113710: Tier 2 optimizer: check the function instead of checking globals. (GH-116410)
This commit is contained in:
parent
33c0aa3bb9
commit
27858e2a17
6 changed files with 137 additions and 149 deletions
12
Python/executor_cases.c.h
generated
12
Python/executor_cases.c.h
generated
|
@ -3789,15 +3789,9 @@
|
|||
break;
|
||||
}
|
||||
|
||||
case _CHECK_GLOBALS: {
|
||||
PyObject *dict = (PyObject *)CURRENT_OPERAND();
|
||||
if (GLOBALS() != dict) goto deoptimize;
|
||||
break;
|
||||
}
|
||||
|
||||
case _CHECK_BUILTINS: {
|
||||
PyObject *dict = (PyObject *)CURRENT_OPERAND();
|
||||
if (BUILTINS() != dict) goto deoptimize;
|
||||
case _CHECK_FUNCTION: {
|
||||
PyObject *func = (PyObject *)CURRENT_OPERAND();
|
||||
if (frame->f_funcobj != func) goto deoptimize;
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue