[pypy-svn] r53733 - pypy/branch/io-improvements/pypy/rpython/memory/gctransform

fijal at codespeak.net fijal at codespeak.net
Sun Apr 13 04:10:02 CEST 2008


Author: fijal
Date: Sun Apr 13 04:10:01 2008
New Revision: 53733

Modified:
   pypy/branch/io-improvements/pypy/rpython/memory/gctransform/boehm.py
   pypy/branch/io-improvements/pypy/rpython/memory/gctransform/transform.py
Log:
actually move this up a bit in subclass hierarchy (framework.py will
use it than as well)


Modified: pypy/branch/io-improvements/pypy/rpython/memory/gctransform/boehm.py
==============================================================================
--- pypy/branch/io-improvements/pypy/rpython/memory/gctransform/boehm.py	(original)
+++ pypy/branch/io-improvements/pypy/rpython/memory/gctransform/boehm.py	Sun Apr 13 04:10:01 2008
@@ -141,9 +141,6 @@
                           resulttype = lltype.Signed)
         hop.genop('int_invert', [v_int], resultvar=hop.spaceop.result)
 
-    def gct_gc_can_move(self, hop):
-        return hop.cast_result(rmodel.inputconst(lltype.Bool, False))
-
 ########## weakrefs ##########
 # Boehm: weakref objects are small structures containing only a Boehm
 # disappearing link.  We don't have to hide the link's value with

Modified: pypy/branch/io-improvements/pypy/rpython/memory/gctransform/transform.py
==============================================================================
--- pypy/branch/io-improvements/pypy/rpython/memory/gctransform/transform.py	(original)
+++ pypy/branch/io-improvements/pypy/rpython/memory/gctransform/transform.py	Sun Apr 13 04:10:01 2008
@@ -492,11 +492,11 @@
         flags = hop.spaceop.args[1].value
         flavor = flags['flavor']
         meth = getattr(self, 'gct_fv_%s_malloc' % flavor, None)
-        assert meth, "%s has no support for malloc with flavor %r" % (self, flavor) 
+        assert meth, "%s has no support for malloc with flavor %r" % (self, flavor)
         c_size = rmodel.inputconst(lltype.Signed, llmemory.sizeof(TYPE))
         v_raw = meth(hop, flags, TYPE, c_size)
         hop.cast_result(v_raw)
-    
+ 
     def gct_coalloc(self, hop):
         TYPE = hop.spaceop.result.concretetype.TO
         assert not TYPE._is_varsize()
@@ -527,12 +527,11 @@
         return v_raw        
 
     def gct_malloc_varsize(self, hop):
-
         flags = hop.spaceop.args[1].value
         flavor = flags['flavor']
         assert flavor != 'cpy', "cannot malloc CPython objects directly"
         meth = getattr(self, 'gct_fv_%s_malloc_varsize' % flavor, None)
-        assert meth, "%s has no support for malloc_varsize with flavor %r" % (self, flavor) 
+        assert meth, "%s has no support for malloc_varsize with flavor %r" % (self, flavor)
         return self.varsize_malloc_helper(hop, flags, meth, [])
 
     def gct_coalloc_varsize(self, hop):
@@ -608,3 +607,6 @@
             hop.genop('raw_free', [v])
         else:
             assert False, "%s has no support for free with flavor %r" % (self, flavor)           
+
+    def gct_gc_can_move(self, hop):
+        return hop.cast_result(rmodel.inputconst(lltype.Bool, False))



More information about the Pypy-commit mailing list