mirror of
https://github.com/python/cpython.git
synced 2025-07-09 20:35:26 +00:00
GH-104909: Split LOAD_ATTR_INSTANCE_VALUE
into micro-ops (GH-106678)
This commit is contained in:
parent
32718f908c
commit
487861c6ae
6 changed files with 87 additions and 46 deletions
18
Python/executor_cases.c.h
generated
18
Python/executor_cases.c.h
generated
|
@ -1425,6 +1425,24 @@
|
|||
break;
|
||||
}
|
||||
|
||||
case _GUARD_TYPE_VERSION: {
|
||||
PyObject *owner = stack_pointer[-1];
|
||||
uint32_t type_version = (uint32_t)operand;
|
||||
PyTypeObject *tp = Py_TYPE(owner);
|
||||
assert(type_version != 0);
|
||||
DEOPT_IF(tp->tp_version_tag != type_version, LOAD_ATTR);
|
||||
break;
|
||||
}
|
||||
|
||||
case _CHECK_MANAGED_OBJECT_HAS_VALUES: {
|
||||
PyObject *owner = stack_pointer[-1];
|
||||
assert(Py_TYPE(owner)->tp_dictoffset < 0);
|
||||
assert(Py_TYPE(owner)->tp_flags & Py_TPFLAGS_MANAGED_DICT);
|
||||
PyDictOrValues dorv = *_PyObject_DictOrValuesPointer(owner);
|
||||
DEOPT_IF(!_PyDictOrValues_IsValues(dorv), LOAD_ATTR);
|
||||
break;
|
||||
}
|
||||
|
||||
case COMPARE_OP: {
|
||||
static_assert(INLINE_CACHE_ENTRIES_COMPARE_OP == 1, "incorrect cache size");
|
||||
PyObject *right = stack_pointer[-1];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue