Skip to content

Commit 4f9eeb3

Browse files
committed
Use atomics to load valid bit for inline values in _GUARD_DORV_VALUES_INST_ATTR_FROM_DICT
1 parent 29c3356 commit 4f9eeb3

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

Python/bytecodes.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3216,7 +3216,8 @@ dummy_func(
32163216
op(_GUARD_DORV_VALUES_INST_ATTR_FROM_DICT, (owner -- owner)) {
32173217
PyObject *owner_o = PyStackRef_AsPyObjectBorrow(owner);
32183218
assert(Py_TYPE(owner_o)->tp_flags & Py_TPFLAGS_INLINE_VALUES);
3219-
DEOPT_IF(!_PyObject_InlineValues(owner_o)->valid);
3219+
PyDictValues *ivs = _PyObject_InlineValues(owner_o);
3220+
DEOPT_IF(!FT_ATOMIC_LOAD_UINT8(ivs->valid));
32203221
}
32213222

32223223
op(_GUARD_KEYS_VERSION, (keys_version/2, owner -- owner)) {

Python/executor_cases.c.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.

Python/generated_cases.c.h

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

0 commit comments

Comments
 (0)