Commits

Alex Gaynor committed d2c5a48

Remove a bunch of PyObject stuff from the GCs

Comments (0)

Files changed (2)

pypy/rpython/memory/gcwrapper.py

 from pypy.rpython.memory import gctypelayout
 from pypy.objspace.flow.model import Constant
 
+
 class GCManagedHeap(object):
 
     def __init__(self, llinterp, flowgraphs, gc_class, GC_PARAMS={}):
         else:
             return True
 
-    def pyobjectptr(self, klass):
-        raise NotImplementedError(klass)
-
 # ____________________________________________________________
 
 class LLInterpRootWalker:
         super(DirectRunLayoutBuilder, self).__init__(GCClass, lltype2vtable)
 
     def make_finalizer_funcptr_for_type(self, TYPE):
-        from pypy.rpython.memory.gctransform.support import get_rtti, \
-                type_contains_pyobjs
+        from pypy.rpython.memory.gctransform.support import get_rtti
         rtti = get_rtti(TYPE)
         if rtti is not None and hasattr(rtti._obj, 'destructor_funcptr'):
             destrptr = rtti._obj.destructor_funcptr
         else:
             return None, False
 
-        assert not type_contains_pyobjs(TYPE), "not implemented"
         t = self.llinterp.typer.annotator.translator
         light = not FinalizerAnalyzer(t).analyze_light_finalizer(destrgraph)
         def ll_finalizer(addr, dummy):
         return llhelper(gctypelayout.GCData.FINALIZER_OR_CT, ll_finalizer), light
 
     def make_custom_trace_funcptr_for_type(self, TYPE):
-        from pypy.rpython.memory.gctransform.support import get_rtti, \
-                type_contains_pyobjs
+        from pypy.rpython.memory.gctransform.support import get_rtti
         rtti = get_rtti(TYPE)
         if rtti is not None and hasattr(rtti._obj, 'custom_trace_funcptr'):
             return rtti._obj.custom_trace_funcptr

pypy/rpython/memory/lltypelayout.py

         return "i"
     elif isinstance(TYPE, lltype.FuncType):
         return "i"
-    elif isinstance(TYPE, lltype.PyObjectType):
-        return "i"
     else:
         assert 0, "type %s not yet implemented" % (TYPE, )
 
         return get_fixed_size(lltype.Unsigned)
     elif isinstance(TYPE, lltype.FuncType):
         return get_fixed_size(lltype.Unsigned)
-    elif isinstance(TYPE, lltype.PyObjectType):
-        return get_fixed_size(lltype.Unsigned)
     assert 0, "not yet implemented"
 
 def get_variable_size(TYPE):
         return 0
     elif isinstance(TYPE, lltype.FuncType):
         return 0
-    elif isinstance(TYPE, lltype.PyObjectType):
-        return 0
     elif isinstance(TYPE, lltype.Ptr):
         return 0
     else: