Author: Maciej Fijalkowski <[email protected]>
Branch: lightweight-finalizers
Changeset: r48386:6949b37f7cb8
Date: 2011-10-24 16:33 +0200
http://bitbucket.org/pypy/pypy/changeset/6949b37f7cb8/

Log:    rewrite obvious nonsense, needs tests

diff --git a/pypy/rpython/memory/gc/minimark.py 
b/pypy/rpython/memory/gc/minimark.py
--- a/pypy/rpython/memory/gc/minimark.py
+++ b/pypy/rpython/memory/gc/minimark.py
@@ -1845,16 +1845,12 @@
         don't do anything fancy and *just* call them. Among other things
         they won't resurrect objects
         """
-        new_objects = self.AddressStack()
         while self.young_objects_with_light_finalizers.non_empty():
             obj = self.young_objects_with_light_finalizers.pop()
-            if self.is_forwarded(obj):
-                new_objects.append(self.get_forwarding_address(obj))
-            else:
+            if not self.is_forwarded(obj):
                 finalizer = self.getlightfinalizer(self.get_type_id(obj))
                 ll_assert(bool(finalizer), "no light finalizer found")
                 finalizer(obj, llmemory.NULL)
-        self.objects_with_light_finalizers = new_objects
 
     def deal_with_objects_with_finalizers(self):
         # Walk over list of objects with finalizers.
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to