Skip to content

Commit 5d0fa92

Browse files
committed
Split STORE_ATTR_SLOT
1 parent 5ba03d1 commit 5d0fa92

File tree

5 files changed

+104
-40
lines changed

5 files changed

+104
-40
lines changed

Include/internal/pycore_opcode_metadata.h

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

Python/abstract_interp_cases.c.h

Lines changed: 9 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: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2083,10 +2083,13 @@ dummy_func(
20832083
Py_DECREF(owner);
20842084
}
20852085

2086-
inst(STORE_ATTR_SLOT, (unused/1, type_version/2, index/1, value, owner --)) {
2086+
op(_GUARD_TYPE_VERSION_STORE, (type_version/2, owner -- owner)) {
20872087
PyTypeObject *tp = Py_TYPE(owner);
20882088
assert(type_version != 0);
20892089
DEOPT_IF(tp->tp_version_tag != type_version, STORE_ATTR);
2090+
}
2091+
2092+
op(_STORE_ATTR_SLOT, (index/1, value, owner --)) {
20902093
char *addr = (char *)owner + index;
20912094
STAT_INC(STORE_ATTR, hit);
20922095
PyObject *old_value = *(PyObject **)addr;
@@ -2095,6 +2098,11 @@ dummy_func(
20952098
Py_DECREF(owner);
20962099
}
20972100

2101+
macro(STORE_ATTR_SLOT) =
2102+
unused/1 +
2103+
_GUARD_TYPE_VERSION_STORE +
2104+
_STORE_ATTR_SLOT;
2105+
20982106
family(COMPARE_OP, INLINE_CACHE_ENTRIES_COMPARE_OP) = {
20992107
COMPARE_OP_FLOAT,
21002108
COMPARE_OP_INT,

Python/executor_cases.c.h

Lines changed: 26 additions & 0 deletions
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: 17 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)