mirror of
https://github.com/python/cpython.git
synced 2026-02-06 01:45:25 +00:00
gh-144145: Revert PR#144122 for performance and potential bugs. (GH-144391)
Revert "gh-144145: Track nullness of properties in the Tier 2 JIT optimizer (GH-144122)"
This reverts commit 1dc12b2883.
This commit is contained in:
parent
c3b61ef73d
commit
ebbb2ca81f
11 changed files with 902 additions and 1589 deletions
|
|
@ -2671,23 +2671,6 @@ dummy_func(
|
|||
Py_XDECREF(old_value);
|
||||
}
|
||||
|
||||
op(_STORE_ATTR_INSTANCE_VALUE_NULL, (offset/1, value, owner -- o)) {
|
||||
PyObject *owner_o = PyStackRef_AsPyObjectBorrow(owner);
|
||||
|
||||
STAT_INC(STORE_ATTR, hit);
|
||||
assert(_PyObject_GetManagedDict(owner_o) == NULL);
|
||||
PyObject **value_ptr = (PyObject**)(((char *)owner_o) + offset);
|
||||
PyObject *old_value = *value_ptr;
|
||||
DEOPT_IF(old_value != NULL);
|
||||
FT_ATOMIC_STORE_PTR_RELEASE(*value_ptr, PyStackRef_AsPyObjectSteal(value));
|
||||
PyDictValues *values = _PyObject_InlineValues(owner_o);
|
||||
Py_ssize_t index = value_ptr - values->values;
|
||||
_PyDictValues_AddToInsertionOrder(values, index);
|
||||
UNLOCK_OBJECT(owner_o);
|
||||
INPUTS_DEAD();
|
||||
o = owner;
|
||||
}
|
||||
|
||||
macro(STORE_ATTR_INSTANCE_VALUE) =
|
||||
unused/1 +
|
||||
_GUARD_TYPE_VERSION_AND_LOCK +
|
||||
|
|
@ -2750,20 +2733,6 @@ dummy_func(
|
|||
Py_XDECREF(old_value);
|
||||
}
|
||||
|
||||
op(_STORE_ATTR_SLOT_NULL, (index/1, value, owner -- o)) {
|
||||
PyObject *owner_o = PyStackRef_AsPyObjectBorrow(owner);
|
||||
|
||||
DEOPT_IF(!LOCK_OBJECT(owner_o));
|
||||
char *addr = (char *)owner_o + index;
|
||||
STAT_INC(STORE_ATTR, hit);
|
||||
PyObject *old_value = *(PyObject **)addr;
|
||||
DEOPT_IF(old_value != NULL);
|
||||
FT_ATOMIC_STORE_PTR_RELEASE(*(PyObject **)addr, PyStackRef_AsPyObjectSteal(value));
|
||||
UNLOCK_OBJECT(owner_o);
|
||||
INPUTS_DEAD();
|
||||
o = owner;
|
||||
}
|
||||
|
||||
macro(STORE_ATTR_SLOT) =
|
||||
unused/1 +
|
||||
_GUARD_TYPE_VERSION +
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue