GH-104909: Split LOAD_ATTR_INSTANCE_VALUE into micro-ops (GH-106678)
This commit is contained in:
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];
|
||||
|
||||
Reference in New Issue
Block a user