[pypy-svn] r51693 - pypy/branch/gc-in-genc/pypy/translator/c

arigo at codespeak.net arigo at codespeak.net
Wed Feb 20 16:14:29 CET 2008


Author: arigo
Date: Wed Feb 20 16:14:28 2008
New Revision: 51693

Modified:
   pypy/branch/gc-in-genc/pypy/translator/c/gc.py
Log:
Kill a bit more code.


Modified: pypy/branch/gc-in-genc/pypy/translator/c/gc.py
==============================================================================
--- pypy/branch/gc-in-genc/pypy/translator/c/gc.py	(original)
+++ pypy/branch/gc-in-genc/pypy/translator/c/gc.py	Wed Feb 20 16:14:28 2008
@@ -15,24 +15,6 @@
         self.db = db
         self.thread_enabled = thread_enabled
 
-    def common_gcheader_definition(self, defnode):
-        return []
-
-    def common_gcheader_initdata(self, defnode):
-        return []
-
-    def struct_gcheader_definition(self, defnode):
-        return self.common_gcheader_definition(defnode)
-
-    def struct_gcheader_initdata(self, defnode):
-        return self.common_gcheader_initdata(defnode)
-
-    def array_gcheader_definition(self, defnode):
-        return self.common_gcheader_definition(defnode)
-
-    def array_gcheader_initdata(self, defnode):
-        return self.common_gcheader_initdata(defnode)
-
     def gc_libraries(self):
         return []
 
@@ -48,9 +30,6 @@
     def struct_setup(self, structdefnode, rtti):
         return None
 
-    def array_setup(self, arraydefnode):
-        return None
-
     def rtti_type(self):
         return ''
 
@@ -86,22 +65,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 []
-
     # for structs
 
     def struct_setup(self, structdefnode, rtti):
@@ -112,11 +75,6 @@
             structdefnode.gcinfo = RefcountingInfo()
             structdefnode.gcinfo.static_deallocator = structdefnode.db.get(fptr)
 
-    # for arrays
-
-    def array_setup(self, arraydefnode):
-        pass
-
     # for rtti node
 
     def rtti_type(self):
@@ -171,9 +129,6 @@
 class BoehmGcPolicy(BasicGcPolicy):
     transformerclass = boehm.BoehmGCTransformer
 
-    def array_setup(self, arraydefnode):
-        pass
-
     def struct_setup(self, structdefnode, rtti):
         pass
 
@@ -275,9 +230,6 @@
             fptr = gctransf.finalizer_funcptr_for_type(structdefnode.STRUCT)
             self.db.get(fptr)
 
-    def array_setup(self, arraydefnode):
-        pass
-
     def rtti_type(self):
         return FrameworkGcRuntimeTypeInfo_OpaqueNode.typename
 



More information about the Pypy-commit mailing list