mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
GH-119258: Handle STORE_ATTR_WITH_HINT in tier two (GH-119481)
This commit is contained in:
parent
cfcc054dee
commit
5cd3ffd6b7
8 changed files with 137 additions and 61 deletions
|
@ -2119,11 +2119,8 @@ dummy_func(
|
|||
_GUARD_DORV_NO_DICT +
|
||||
_STORE_ATTR_INSTANCE_VALUE;
|
||||
|
||||
inst(STORE_ATTR_WITH_HINT, (unused/1, type_version/2, hint/1, value, owner --)) {
|
||||
PyTypeObject *tp = Py_TYPE(owner);
|
||||
assert(type_version != 0);
|
||||
DEOPT_IF(tp->tp_version_tag != type_version);
|
||||
assert(tp->tp_flags & Py_TPFLAGS_MANAGED_DICT);
|
||||
op(_STORE_ATTR_WITH_HINT, (hint/1, value, owner --)) {
|
||||
assert(Py_TYPE(owner)->tp_flags & Py_TPFLAGS_MANAGED_DICT);
|
||||
PyDictObject *dict = _PyObject_GetManagedDict(owner);
|
||||
DEOPT_IF(dict == NULL);
|
||||
assert(PyDict_CheckExact((PyObject *)dict));
|
||||
|
@ -2158,6 +2155,11 @@ dummy_func(
|
|||
Py_DECREF(owner);
|
||||
}
|
||||
|
||||
macro(STORE_ATTR_WITH_HINT) =
|
||||
unused/1 +
|
||||
_GUARD_TYPE_VERSION +
|
||||
_STORE_ATTR_WITH_HINT;
|
||||
|
||||
op(_STORE_ATTR_SLOT, (index/1, value, owner --)) {
|
||||
char *addr = (char *)owner + index;
|
||||
STAT_INC(STORE_ATTR, hit);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue