GH-113710: Tier 2 optimizer: check the function instead of checking globals. (GH-116410)

This commit is contained in:
Mark Shannon
2024-03-06 13:12:23 +00:00
committed by GitHub
parent 33c0aa3bb9
commit 27858e2a17
6 changed files with 137 additions and 149 deletions

View File

@@ -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;
}