8000 GH-119258: Handle STORE_ATTR_WITH_HINT in tier two (GH-119481) · python/cpython@5cd3ffd · GitHub
[go: up one dir, main page]

Skip to content

Commit 5cd3ffd

Browse files
authored
GH-119258: Handle STORE_ATTR_WITH_HINT in tier two (GH-119481)
1 parent cfcc054 commit 5cd3ffd

File tree

8 files changed

+137
-61
lines changed

8 files changed

+137
-61
lines changed

Include/internal/pycore_dict.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ dict_next_version(PyInterpreterState *interp)
246246
((INTERP)->dict_state.global_version += DICT_VERSION_INCREMENT)
247247
#endif
248248

249-
void
249+
PyAPI_FUNC(void)
250250
_PyDict_SendEvent(int watcher_bits,
251251
PyDict_WatchEvent event,
252252
PyDictObject *mp,

Include/internal/pycore_opcode_metadata.h

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Include/internal/pycore_uop_ids.h

Lines changed: 15 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Include/internal/pycore_uop_metadata.h

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Python/bytecodes.c

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2119,11 +2119,8 @@ dummy_func(
21192119
_GUARD_DORV_NO_DICT +
21202120
_STORE_ATTR_INSTANCE_VALUE;
21212121

2122-
inst(STORE_ATTR_WITH_HINT, (unused/1, type_version/2, hint/1, value, owner --)) {
2123-
PyTypeObject *tp = Py_TYPE(owner);
2124-
assert(type_version != 0);
2125-
DEOPT_IF(tp->tp_version_tag != type_version);
2126-
assert(tp->tp_flags & Py_TPFLAGS_MANAGED_DICT);
2122+
op(_STORE_ATTR_WITH_HINT, (hint/1, value, owner --)) {
2123+
assert(Py_TYPE(owner)->tp_flags & Py_TPFLAGS_MANAGED_DICT);
21272124
PyDictObject *dict = _PyObject_GetManagedDict(owner);
21282125
DEOPT_IF(dict == NULL);
21292126
assert(PyDict_CheckExact((PyObject *)dict));
@@ -2158,6 +2155,11 @@ dummy_func(
21582155
Py_DECREF(owner);
21592156
}
21602157

2158+
macro(STORE_ATTR_WITH_HINT) =
2159+
unused/1 +
2160+
_GUARD_TYPE_VERSION +
2161+
_STORE_ATTR_WITH_HINT;
2162+
21612163
op(_STORE_ATTR_SLOT, (index/1, value, owner --)) {
21622164
char *addr = (char *)owner + index;
21632165
STAT_INC(STORE_ATTR, hit);

Python/executor_cases.c.h

Lines changed: 61 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Python/generated_cases.c.h

Lines changed: 43 additions & 37 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Python/optimizer_cases.c.h

Lines changed: 4 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)
0