GH-127010: Don't lazily track and untrack dicts (GH-127027)

This commit is contained in:
Mark Shannon 2024-11-20 16:41:20 +00:00 committed by GitHub
parent 7191b7662e
commit aea0c586d1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 43 additions and 282 deletions

View file

@ -2914,10 +2914,6 @@
UOP_STAT_INC(uopcode, miss);
JUMP_TO_JUMP_TARGET();
}
/* Ensure dict is GC tracked if it needs to be */
if (!_PyObject_GC_IS_TRACKED(dict) && _PyObject_GC_MAY_BE_TRACKED(PyStackRef_AsPyObjectBorrow(value))) {
_PyObject_GC_TRACK(dict);
}
_PyFrame_SetStackPointer(frame, stack_pointer);
_PyDict_NotifyEvent(tstate->interp, PyDict_EVENT_MODIFIED, dict, name, PyStackRef_AsPyObjectBorrow(value));
stack_pointer = _PyFrame_GetStackPointer(frame);