summaryrefslogtreecommitdiffstats
path: root/Python/executor_cases.c.h
diff options
context:
space:
mode:
authorMark Shannon <mark@hotpy.org>2024-03-06 13:12:23 (GMT)
committerGitHub <noreply@github.com>2024-03-06 13:12:23 (GMT)
commit27858e2a17924dfac9a10efc17caee1f5126ea19 (patch)
tree2af07baa6bdc4bed313b95a25ff224dbd0fdf0e7 /Python/executor_cases.c.h
parent33c0aa3bb9b334593e27fe4b2b0fe912117a1ee1 (diff)
downloadcpython-27858e2a17924dfac9a10efc17caee1f5126ea19.zip
cpython-27858e2a17924dfac9a10efc17caee1f5126ea19.tar.gz
cpython-27858e2a17924dfac9a10efc17caee1f5126ea19.tar.bz2
GH-113710: Tier 2 optimizer: check the function instead of checking globals. (GH-116410)
Diffstat (limited to 'Python/executor_cases.c.h')
-rw-r--r--Python/executor_cases.c.h12
1 files changed, 3 insertions, 9 deletions
diff --git a/Python/executor_cases.c.h b/Python/executor_cases.c.h
index 806f748..a057466 100644
--- a/Python/executor_cases.c.h
+++ b/Python/executor_cases.c.h
@@ -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;
}