summaryrefslogtreecommitdiffstats
path: root/Python/bytecodes.c
diff options
context:
space:
mode:
authorMark Shannon <mark@hotpy.org>2024-02-22 14:48:25 (GMT)
committerGitHub <noreply@github.com>2024-02-22 14:48:25 (GMT)
commitb348313e7a48811acacc293ac4b2c8b20b4c631b (patch)
tree8a1f0fdd03b673ce71bac5b6a3b649694d018b90 /Python/bytecodes.c
parentc6a47de70966e6899871245e800a0a9271e25b12 (diff)
downloadcpython-b348313e7a48811acacc293ac4b2c8b20b4c631b.zip
cpython-b348313e7a48811acacc293ac4b2c8b20b4c631b.tar.gz
cpython-b348313e7a48811acacc293ac4b2c8b20b4c631b.tar.bz2
GH-115651: Convert `LOAD_MODULE_ATTR` into `LOAD_INLINE_CONST` when the module is itself a constant. (GH-115711)
Diffstat (limited to 'Python/bytecodes.c')
-rw-r--r--Python/bytecodes.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/bytecodes.c b/Python/bytecodes.c
index 5835b80..7e2c9c4 100644
--- a/Python/bytecodes.c
+++ b/Python/bytecodes.c
@@ -1932,11 +1932,11 @@ dummy_func(
_LOAD_ATTR_INSTANCE_VALUE +
unused/5; // Skip over rest of cache
- op(_CHECK_ATTR_MODULE, (type_version/2, owner -- owner)) {
+ op(_CHECK_ATTR_MODULE, (dict_version/2, owner -- owner)) {
DEOPT_IF(!PyModule_CheckExact(owner));
PyDictObject *dict = (PyDictObject *)((PyModuleObject *)owner)->md_dict;
assert(dict != NULL);
- DEOPT_IF(dict->ma_keys->dk_version != type_version);
+ DEOPT_IF(dict->ma_keys->dk_version != dict_version);
}
op(_LOAD_ATTR_MODULE, (index/1, owner -- attr, null if (oparg & 1))) {