[pypy-svn] r32244 - in pypy/branch/more-gckinds/pypy: rpython rpython/lltypesystem translator/c

mwh at codespeak.net mwh at codespeak.net
Wed Sep 13 10:49:32 CEST 2006


Author: mwh
Date: Wed Sep 13 10:49:30 2006
New Revision: 32244

Modified:
   pypy/branch/more-gckinds/pypy/rpython/annlowlevel.py
   pypy/branch/more-gckinds/pypy/rpython/lltypesystem/lltype.py
   pypy/branch/more-gckinds/pypy/translator/c/funcgen.py
Log:
somehow i missed reverting a bit of the change towards _gckind == 'prebuilt' --
this meant function pointers were viewed as needing gc, not really a good thing
:-)


Modified: pypy/branch/more-gckinds/pypy/rpython/annlowlevel.py
==============================================================================
--- pypy/branch/more-gckinds/pypy/rpython/annlowlevel.py	(original)
+++ pypy/branch/more-gckinds/pypy/rpython/annlowlevel.py	Wed Sep 13 10:49:30 2006
@@ -178,7 +178,7 @@
         return Constant(p, lltype.typeOf(p))
 
     def graph2delayed(self, graph):
-        FUNCTYPE = lltype.FuncForwardReference()
+        FUNCTYPE = lltype.ForwardReference()
         # obscure hack: embed the name of the function in the string, so
         # that the genc database can get it even before the delayedptr
         # is really computed

Modified: pypy/branch/more-gckinds/pypy/rpython/lltypesystem/lltype.py
==============================================================================
--- pypy/branch/more-gckinds/pypy/rpython/lltypesystem/lltype.py	(original)
+++ pypy/branch/more-gckinds/pypy/rpython/lltypesystem/lltype.py	Wed Sep 13 10:49:30 2006
@@ -411,7 +411,7 @@
 
 
 class FuncType(ContainerType):
-    _gckind = 'prebuilt'
+    _gckind = 'raw'
     __name__ = 'func'
     def __init__(self, args, result):
         for arg in args:
@@ -512,9 +512,6 @@
 class PyForwardReference(ForwardReference):
     _gckind = 'cpy'
 
-class FuncForwardReference(ForwardReference):
-    _gckind = 'prebuilt'
-
 FORWARDREF_BY_FLAVOR = {'raw': ForwardReference,
                         'gc':  GcForwardReference,
                         'cpy': PyForwardReference}

Modified: pypy/branch/more-gckinds/pypy/translator/c/funcgen.py
==============================================================================
--- pypy/branch/more-gckinds/pypy/translator/c/funcgen.py	(original)
+++ pypy/branch/more-gckinds/pypy/translator/c/funcgen.py	Wed Sep 13 10:49:30 2006
@@ -10,7 +10,7 @@
 from pypy.rpython.lltypesystem.lltype import UnsignedLongLong, Char, UniChar
 from pypy.rpython.lltypesystem.lltype import pyobjectptr, ContainerType
 from pypy.rpython.lltypesystem.lltype import Struct, Array, FixedSizeArray
-from pypy.rpython.lltypesystem.lltype import FuncForwardReference
+from pypy.rpython.lltypesystem.lltype import ForwardReference
 from pypy.rpython.lltypesystem.llmemory import Address, WeakGcAddress
 from pypy.translator.backendopt.ssa import SSI_to_SSA
 
@@ -58,7 +58,7 @@
             T = getattr(v, 'concretetype', PyObjPtr)
             # obscure: skip forward references and hope for the best
             # (needed for delayed function pointers)
-            if isinstance(T, Ptr) and T.TO.__class__ == FuncForwardReference:
+            if isinstance(T, Ptr) and T.TO.__class__ == ForwardReference:
                 continue
             db.gettype(T)  # force the type to be considered by the database
        



More information about the Pypy-commit mailing list