diff options
author | Mark Shannon <mark@hotpy.org> | 2024-03-06 13:12:23 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-06 13:12:23 +0000 |
commit | 27858e2a17924dfac9a10efc17caee1f5126ea19 (patch) | |
tree | 2af07baa6bdc4bed313b95a25ff224dbd0fdf0e7 /Python/bytecodes.c | |
parent | 33c0aa3bb9b334593e27fe4b2b0fe912117a1ee1 (diff) | |
download | cpython-27858e2a17924dfac9a10efc17caee1f5126ea19.tar.gz cpython-27858e2a17924dfac9a10efc17caee1f5126ea19.zip |
GH-113710: Tier 2 optimizer: check the function instead of checking globals. (GH-116410)
Diffstat (limited to 'Python/bytecodes.c')
-rw-r--r-- | Python/bytecodes.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/Python/bytecodes.c b/Python/bytecodes.c index 15794cb017f..ad4ea4ea312 100644 --- a/Python/bytecodes.c +++ b/Python/bytecodes.c @@ -4058,12 +4058,8 @@ dummy_func( null = NULL; } - tier2 op(_CHECK_GLOBALS, (dict/4 -- )) { - DEOPT_IF(GLOBALS() != dict); - } - - tier2 op(_CHECK_BUILTINS, (dict/4 -- )) { - DEOPT_IF(BUILTINS() != dict); + tier2 op(_CHECK_FUNCTION, (func/4 -- )) { + DEOPT_IF(frame->f_funcobj != func); } /* Internal -- for testing executors */ |