[pypy-commit] pypy cpyext-gc-cycle: Fixed TODOs for rrc mark and incmark for modern finalizers
stevie_92
pypy.commits at gmail.com
Thu Sep 19 15:18:14 EDT 2019
Author: Stefan Beyer <home at sbeyer.at>
Branch: cpyext-gc-cycle
Changeset: r97552:9ce0c4b2a38c
Date: 2019-09-07 12:01 +0200
http://bitbucket.org/pypy/pypy/changeset/9ce0c4b2a38c/
Log: Fixed TODOs for rrc mark and incmark for modern finalizers
diff --git a/rpython/memory/gc/rrc/incmark.py b/rpython/memory/gc/rrc/incmark.py
--- a/rpython/memory/gc/rrc/incmark.py
+++ b/rpython/memory/gc/rrc/incmark.py
@@ -25,8 +25,13 @@
# this cycle.
if not self._gc_list_is_empty(self.pyobj_old_list):
self._gc_list_merge(self.pyobj_old_list, self.pyobj_list)
- # TODO: take snapshot of pyobj_old_list and perform _collect_roots
- # incrementally (own phase)
+ # TODO: use separate list and process it after pyobj_list has been
+ # fully processed (just before modern finalizers) if references
+ # to separate list are encountered during take_snapshot
+ # move them to pyobj_list and include them in the snapshot.
+ # For the remaining list (before modern finalizers), check
+ # if there are external references from marked non-rc objects
+ # (rc objects were already detected during take_snapshot)
# Untrack all tuples with only non-gc rrc objects and
# promote all other tuples to the pyobj_list
diff --git a/rpython/memory/gc/rrc/mark.py b/rpython/memory/gc/rrc/mark.py
--- a/rpython/memory/gc/rrc/mark.py
+++ b/rpython/memory/gc/rrc/mark.py
@@ -26,6 +26,9 @@
dead_list_empty = True
if not self._gc_list_is_empty(self.pyobj_old_list):
dead_list_empty = self._check_finalizer()
+ # TODO: cannot work this way -> must first do full collection of
+ # new graph, bc back ref over non-rrc from new rrc graph (#1)
+ # TODO: see incmark (instead of take_snapshot during collect_roots)
# collect all rawrefcounted roots
self._collect_roots()
More information about the pypy-commit
mailing list