[pypy-svn] r51625 - pypy/branch/no-forw-ptr/pypy/rpython/memory/gc

arigo at codespeak.net arigo at codespeak.net
Tue Feb 19 12:59:27 CET 2008


Author: arigo
Date: Tue Feb 19 12:59:26 2008
New Revision: 51625

Modified:
   pypy/branch/no-forw-ptr/pypy/rpython/memory/gc/semispace.py
Log:
Move this initialization code to translation-time instead of run-time.


Modified: pypy/branch/no-forw-ptr/pypy/rpython/memory/gc/semispace.py
==============================================================================
--- pypy/branch/no-forw-ptr/pypy/rpython/memory/gc/semispace.py	(original)
+++ pypy/branch/no-forw-ptr/pypy/rpython/memory/gc/semispace.py	Tue Feb 19 12:59:26 2008
@@ -44,6 +44,11 @@
         self.gcheaderbuilder = GCHeaderBuilder(self.HDR)
         self.AddressStack = get_address_stack(chunk_size)
         self.AddressDeque = get_address_deque(chunk_size)
+        self.objects_with_finalizers = self.AddressDeque()
+        self.run_finalizers = self.AddressDeque()
+        self.objects_with_weakrefs = self.AddressStack()
+        self.finalizer_lock_count = 0
+        self.red_zone = 0
 
     def setup(self):
         if DEBUG_PRINT:
@@ -55,11 +60,6 @@
         self.fromspace = llarena.arena_malloc(self.space_size, True)
         ll_assert(bool(self.fromspace), "couldn't allocate fromspace")
         self.free = self.tospace
-        self.objects_with_finalizers = self.AddressDeque()
-        self.run_finalizers = self.AddressDeque()
-        self.objects_with_weakrefs = self.AddressStack()
-        self.finalizer_lock_count = 0
-        self.red_zone = 0
 
     def disable_finalizers(self):
         self.finalizer_lock_count += 1



More information about the Pypy-commit mailing list