mirror of
https://github.com/python/cpython.git
synced 2025-10-21 14:12:27 +00:00
gh-103951: enable optimization for fast attribute access on module subclasses (GH-126264)
Co-authored-by: Nicolas Tessore <n.tessore@ucl.ac.uk>
This commit is contained in:
parent
3fecbe9255
commit
d9e251223e
5 changed files with 6 additions and 4 deletions
|
@ -2132,7 +2132,7 @@ dummy_func(
|
|||
|
||||
op(_CHECK_ATTR_MODULE, (dict_version/2, owner -- owner)) {
|
||||
PyObject *owner_o = PyStackRef_AsPyObjectBorrow(owner);
|
||||
DEOPT_IF(!PyModule_CheckExact(owner_o));
|
||||
DEOPT_IF(Py_TYPE(owner_o)->tp_getattro != PyModule_Type.tp_getattro);
|
||||
PyDictObject *dict = (PyDictObject *)((PyModuleObject *)owner_o)->md_dict;
|
||||
assert(dict != NULL);
|
||||
DEOPT_IF(dict->ma_keys->dk_version != dict_version);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue