[pypy-svn] r51753 - pypy/branch/unified-rtti/pypy/translator/c

arigo at codespeak.net arigo at codespeak.net
Thu Feb 21 17:49:40 CET 2008


Author: arigo
Date: Thu Feb 21 17:49:39 2008
New Revision: 51753

Modified:
   pypy/branch/unified-rtti/pypy/translator/c/gc.py
Log:
Kill code until the Boehm tests pass.  :-)


Modified: pypy/branch/unified-rtti/pypy/translator/c/gc.py
==============================================================================
--- pypy/branch/unified-rtti/pypy/translator/c/gc.py	(original)
+++ pypy/branch/unified-rtti/pypy/translator/c/gc.py	Thu Feb 21 17:49:39 2008
@@ -15,10 +15,20 @@
         self.thread_enabled = thread_enabled
 
     def common_gcheader_definition(self, defnode):
-        return []
+        if defnode.db.gctransformer is not None:
+            HDR = defnode.db.gctransformer.HDR
+            return [(name, HDR._flds[name]) for name in HDR._names]
+        else:
+            return []
 
     def common_gcheader_initdata(self, defnode):
-        return []
+        if defnode.db.gctransformer is not None:
+            gct = defnode.db.gctransformer
+            hdr = gct.gcheaderbuilder.header_of_object(top_container(defnode.obj))
+            HDR = gct.HDR
+            return [getattr(hdr, fldname) for fldname in HDR._names]
+        else:
+            return []
 
     def struct_gcheader_definition(self, defnode):
         return self.common_gcheader_definition(defnode)
@@ -71,29 +81,6 @@
 class RefcountingGcPolicy(BasicGcPolicy):
     transformerclass = refcounting.RefcountingGCTransformer
 
-    def common_gcheader_definition(self, defnode):
-        if defnode.db.gctransformer is not None:
-            HDR = defnode.db.gctransformer.HDR
-            return [(name, HDR._flds[name]) for name in HDR._names]
-        else:
-            return []
-
-    def common_gcheader_initdata(self, defnode):
-        if defnode.db.gctransformer is not None:
-            gct = defnode.db.gctransformer
-            hdr = gct.gcheaderbuilder.header_of_object(top_container(defnode.obj))
-            HDR = gct.HDR
-            return [getattr(hdr, fldname) for fldname in HDR._names]
-        else:
-            return []
-
-    # zero malloc impl
-
-    def OP_GC_CALL_RTTI_DESTRUCTOR(self, funcgen, op):
-        args = [funcgen.expr(v) for v in op.args]
-        line = '%s(%s);' % (args[0], ', '.join(args[1:]))
-        return line     
-
     def OP_GC__COLLECT(self, funcgen, op):
         return ''
 



More information about the Pypy-commit mailing list