summaryrefslogtreecommitdiffstats
path: root/Python/bytecodes.c
diff options
context:
space:
mode:
authorMark Shannon <mark@hotpy.org>2024-11-18 14:31:26 (GMT)
committerGitHub <noreply@github.com>2024-11-18 14:31:26 (GMT)
commitb0fcc2c47a34a69c35c1a8031cd0589d3747c1af (patch)
treeaa9d4bfaf49dca8d3ce47aa18a03cf2d5374a8e2 /Python/bytecodes.c
parenta1d9c8aa800dd7c9eb634f89646be10e9cfc9c8d (diff)
downloadcpython-b0fcc2c47a34a69c35c1a8031cd0589d3747c1af.zip
cpython-b0fcc2c47a34a69c35c1a8031cd0589d3747c1af.tar.gz
cpython-b0fcc2c47a34a69c35c1a8031cd0589d3747c1af.tar.bz2
GH-126491: GC: Mark objects reachable from roots before doing cycle collection (GH-126502)
* Mark almost all reachable objects before doing collection phase * Add stats for objects marked * Visit new frames before each increment * Remove lazy dict tracking * Update docs * Clearer calculation of work to do.
Diffstat (limited to 'Python/bytecodes.c')
-rw-r--r--Python/bytecodes.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/Python/bytecodes.c b/Python/bytecodes.c
index c85b498..4479bd5 100644
--- a/Python/bytecodes.c
+++ b/Python/bytecodes.c
@@ -2340,10 +2340,6 @@ dummy_func(
DEOPT_IF(ep->me_key != name);
PyObject *old_value = ep->me_value;
DEOPT_IF(old_value == NULL);
- /* 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);
- }
_PyDict_NotifyEvent(tstate->interp, PyDict_EVENT_MODIFIED, dict, name, PyStackRef_AsPyObjectBorrow(value));
ep->me_value = PyStackRef_AsPyObjectSteal(value);
// old_value should be DECREFed after GC track checking is done, if not, it could raise a segmentation fault,