diff options
| author | Brandt Bucher <brandtbucher@microsoft.com> | 2024-05-28 19:47:54 (GMT) |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-05-28 19:47:54 (GMT) |
| commit | 5cd3ffd6b70a63dbae4d34a1b4db033e19184159 (patch) | |
| tree | e18917b055e6a75fb2ad65d16ed03d7d92081cc7 /Python/bytecodes.c | |
| parent | cfcc054dee87a5a3f18c99d83a2957bf3487de1d (diff) | |
| download | cpython-5cd3ffd6b70a63dbae4d34a1b4db033e19184159.zip cpython-5cd3ffd6b70a63dbae4d34a1b4db033e19184159.tar.gz cpython-5cd3ffd6b70a63dbae4d34a1b4db033e19184159.tar.bz2 | |
GH-119258: Handle STORE_ATTR_WITH_HINT in tier two (GH-119481)
Diffstat (limited to 'Python/bytecodes.c')
| -rw-r--r-- | Python/bytecodes.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/Python/bytecodes.c b/Python/bytecodes.c index 8b12da0..274c5c2 100644 --- a/Python/bytecodes.c +++ b/Python/bytecodes.c @@ -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); |
