[pypy-svn] r77532 - in pypy/branch/larger-writebarrier/pypy/rpython/memory/gc: . test

arigo at codespeak.net arigo at codespeak.net
Fri Oct 1 17:06:33 CEST 2010


Author: arigo
Date: Fri Oct  1 17:06:32 2010
New Revision: 77532

Modified:
   pypy/branch/larger-writebarrier/pypy/rpython/memory/gc/minimark.py
   pypy/branch/larger-writebarrier/pypy/rpython/memory/gc/test/test_direct.py
Log:
Typos.


Modified: pypy/branch/larger-writebarrier/pypy/rpython/memory/gc/minimark.py
==============================================================================
--- pypy/branch/larger-writebarrier/pypy/rpython/memory/gc/minimark.py	(original)
+++ pypy/branch/larger-writebarrier/pypy/rpython/memory/gc/minimark.py	Fri Oct  1 17:06:32 2010
@@ -753,6 +753,7 @@
         # registers, so it does not save and restore them (that's a *hack*!).
         def remember_young_pointer(addr_struct, newvalue):
             # 'addr_struct' is the address of the object in which we write.
+            # 'newvalue' is the address that we are going to write in there.
             if DEBUG:
                 ll_assert(not self.is_in_nursery(addr_struct),
                           "nursery object with GCFLAG_NO_YOUNG_PTRS")
@@ -763,9 +764,9 @@
             # to the list 'old_objects_pointing_to_young'.  We know that
             # 'addr_struct' cannot be in the nursery, because nursery objects
             # never have the flag GCFLAG_NO_YOUNG_PTRS to start with.
+            objhdr = self.header(addr_struct)
             if self.appears_to_be_in_nursery(newvalue):
                 self.old_objects_pointing_to_young.append(addr_struct)
-                objhdr = self.header(addr_struct)
                 objhdr.tid &= ~GCFLAG_NO_YOUNG_PTRS
             #
             # Second part: if 'addr_struct' is actually a prebuilt GC
@@ -785,6 +786,7 @@
 
 
     def _init_writebarrier_with_card_marker(self):
+        DEBUG = self.DEBUG
         def remember_young_pointer_from_array(addr_array, index):
             # 'addr_array' is the address of the object in which we write,
             # which must have an array part;  'index' is the index of the

Modified: pypy/branch/larger-writebarrier/pypy/rpython/memory/gc/test/test_direct.py
==============================================================================
--- pypy/branch/larger-writebarrier/pypy/rpython/memory/gc/test/test_direct.py	(original)
+++ pypy/branch/larger-writebarrier/pypy/rpython/memory/gc/test/test_direct.py	Fri Oct  1 17:06:32 2010
@@ -96,7 +96,7 @@
             newaddr = llmemory.cast_ptr_to_adr(newvalue)
             addr_struct = llmemory.cast_ptr_to_adr(p)
             if hasattr(self.gc, 'write_barrier_from_array'):
-                self.gc.write_barrier_from_array(newvalue, addr_struct, index)
+                self.gc.write_barrier_from_array(newaddr, addr_struct, index)
             else:
                 self.gc.write_barrier(newaddr, addr_struct)
         p[index] = newvalue



More information about the Pypy-commit mailing list