mirror of
https://github.com/python/cpython.git
synced 2026-01-06 23:42:34 +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
2
Python/executor_cases.c.h
generated
2
Python/executor_cases.c.h
generated
|
|
@ -2602,7 +2602,7 @@
|
|||
owner = stack_pointer[-1];
|
||||
uint32_t dict_version = (uint32_t)CURRENT_OPERAND0();
|
||||
PyObject *owner_o = PyStackRef_AsPyObjectBorrow(owner);
|
||||
if (!PyModule_CheckExact(owner_o)) {
|
||||
if (Py_TYPE(owner_o)->tp_getattro != PyModule_Type.tp_getattro) {
|
||||
UOP_STAT_INC(uopcode, miss);
|
||||
JUMP_TO_JUMP_TARGET();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue