[pypy-svn] r70042 - in pypy/branch/listcopyop/pypy/rpython: . lltypesystem memory memory/gctransform memory/gctransform/test memory/test

arigo at codespeak.net arigo at codespeak.net
Thu Dec 10 16:34:28 CET 2009


Author: arigo
Date: Thu Dec 10 16:34:27 2009
New Revision: 70042

Modified:
   pypy/branch/listcopyop/pypy/rpython/llinterp.py
   pypy/branch/listcopyop/pypy/rpython/lltypesystem/opimpl.py
   pypy/branch/listcopyop/pypy/rpython/memory/gctransform/refcounting.py
   pypy/branch/listcopyop/pypy/rpython/memory/gctransform/support.py
   pypy/branch/listcopyop/pypy/rpython/memory/gctransform/test/test_framework.py
   pypy/branch/listcopyop/pypy/rpython/memory/gcwrapper.py
   pypy/branch/listcopyop/pypy/rpython/memory/test/test_transformed_gc.py
Log:
* fix some missing "return True".

* revert a few changes that are not needed any more, as far as I can
  tell.


Modified: pypy/branch/listcopyop/pypy/rpython/llinterp.py
==============================================================================
--- pypy/branch/listcopyop/pypy/rpython/llinterp.py	(original)
+++ pypy/branch/listcopyop/pypy/rpython/llinterp.py	Thu Dec 10 16:34:27 2009
@@ -756,7 +756,9 @@
 
     def op_gc_writebarrier_before_copy(self, source, dest):
         if hasattr(self.heap, 'writebarrier_before_copy'):
-            self.heap.writebarrier_before_copy(source, dest)
+            return self.heap.writebarrier_before_copy(source, dest)
+        else:
+            return True
 
     def op_getfield(self, obj, field):
         checkptr(obj)

Modified: pypy/branch/listcopyop/pypy/rpython/lltypesystem/opimpl.py
==============================================================================
--- pypy/branch/listcopyop/pypy/rpython/lltypesystem/opimpl.py	(original)
+++ pypy/branch/listcopyop/pypy/rpython/lltypesystem/opimpl.py	Thu Dec 10 16:34:27 2009
@@ -400,6 +400,7 @@
     assert isinstance(A.TO, lltype.GcArray)
     assert isinstance(A.TO.OF, lltype.Ptr)
     assert A.TO.OF.TO._gckind == 'gc'
+    return True
 
 def op_getfield(p, name):
     checkptr(p)

Modified: pypy/branch/listcopyop/pypy/rpython/memory/gctransform/refcounting.py
==============================================================================
--- pypy/branch/listcopyop/pypy/rpython/memory/gctransform/refcounting.py	(original)
+++ pypy/branch/listcopyop/pypy/rpython/memory/gctransform/refcounting.py	Thu Dec 10 16:34:27 2009
@@ -160,6 +160,8 @@
             llops.genop("direct_call", [self.decref_ptr, v_adr, cdealloc_fptr])
 
     def gct_gc_writebarrier_before_copy(self, hop):
+        # Not supported, so return False.  Means that rgc.ll_arraycopy()
+        # will do the copy manually (with a 'for' loop).
         return rmodel.inputconst(lltype.Bool, False)
 
     def gct_fv_gc_malloc(self, hop, flags, TYPE, c_size):

Modified: pypy/branch/listcopyop/pypy/rpython/memory/gctransform/support.py
==============================================================================
--- pypy/branch/listcopyop/pypy/rpython/memory/gctransform/support.py	(original)
+++ pypy/branch/listcopyop/pypy/rpython/memory/gctransform/support.py	Thu Dec 10 16:34:27 2009
@@ -1,7 +1,6 @@
 from pypy.rpython.lltypesystem import lltype
 from pypy.rpython.extregistry import ExtRegistryEntry
 from pypy.annotation import model as annmodel
-from pypy.rlib.objectmodel import specialize
 import os
 
 def var_ispyobj(var):

Modified: pypy/branch/listcopyop/pypy/rpython/memory/gctransform/test/test_framework.py
==============================================================================
--- pypy/branch/listcopyop/pypy/rpython/memory/gctransform/test/test_framework.py	(original)
+++ pypy/branch/listcopyop/pypy/rpython/memory/gctransform/test/test_framework.py	Thu Dec 10 16:34:27 2009
@@ -120,7 +120,7 @@
     class GCClass(MarkSweepGC):
         needs_write_barrier = True
         def writebarrier_before_copy(self, source, dest):
-            pass
+            return True
 
 def write_barrier_check(spaceop, needs_write_barrier=True):
     t = TranslationContext()

Modified: pypy/branch/listcopyop/pypy/rpython/memory/gcwrapper.py
==============================================================================
--- pypy/branch/listcopyop/pypy/rpython/memory/gcwrapper.py	(original)
+++ pypy/branch/listcopyop/pypy/rpython/memory/gcwrapper.py	Thu Dec 10 16:34:27 2009
@@ -133,6 +133,8 @@
             source_addr = llmemory.cast_ptr_to_adr(source)
             dest_addr   = llmemory.cast_ptr_to_adr(dest)
             return self.gc.writebarrier_before_copy(source_addr, dest_addr)
+        else:
+            return True
 
 # ____________________________________________________________
 

Modified: pypy/branch/listcopyop/pypy/rpython/memory/test/test_transformed_gc.py
==============================================================================
--- pypy/branch/listcopyop/pypy/rpython/memory/test/test_transformed_gc.py	(original)
+++ pypy/branch/listcopyop/pypy/rpython/memory/test/test_transformed_gc.py	Thu Dec 10 16:34:27 2009
@@ -835,8 +835,7 @@
         return f
 
     def test_gc_heap_stats(self):
-        py.test.skip("XFail fails, so skip")
-        XXX # this test makes next test to crash
+        py.test.skip("this test makes the following test crash.  Investigate.")
         run = self.runner("gc_heap_stats")
         res = run([])
         assert res % 10000 == 2611
@@ -877,7 +876,7 @@
         class transformerclass(framework.FrameworkGCTransformer):
             GC_PARAMS = {'start_heap_size': 4096 }
             root_stack_depth = 200
-            from pypy.rpython.memory.gc.marksweep import MarkSweepGC as GCClass
+
 
     def define_cloning(cls):
         B = lltype.GcStruct('B', ('x', lltype.Signed))



More information about the Pypy-commit mailing list