[pypy-svn] r68271 - in pypy/branch/gc-compress/pypy: rpython/memory/gctransform translator/c

arigo at codespeak.net arigo at codespeak.net
Fri Oct 9 13:05:57 CEST 2009


Author: arigo
Date: Fri Oct  9 13:05:56 2009
New Revision: 68271

Modified:
   pypy/branch/gc-compress/pypy/rpython/memory/gctransform/framework.py
   pypy/branch/gc-compress/pypy/translator/c/database.py
   pypy/branch/gc-compress/pypy/translator/c/node.py
Log:
Fix translation.  A lot of efforts for what is finally just one line...


Modified: pypy/branch/gc-compress/pypy/rpython/memory/gctransform/framework.py
==============================================================================
--- pypy/branch/gc-compress/pypy/rpython/memory/gctransform/framework.py	(original)
+++ pypy/branch/gc-compress/pypy/rpython/memory/gctransform/framework.py	Fri Oct  9 13:05:56 2009
@@ -457,6 +457,10 @@
 
         newgcdependencies = []
         newgcdependencies.append(ll_static_roots_inside)
+        # also add the type_info_group's members into newgcdependencies,
+        # to make sure that they are all followed (only a part of them
+        # might have been followed by a previous enum_dependencies()).
+        newgcdependencies.extend(self.layoutbuilder.type_info_group.members)
         self.write_typeid_list()
         return newgcdependencies
 

Modified: pypy/branch/gc-compress/pypy/translator/c/database.py
==============================================================================
--- pypy/branch/gc-compress/pypy/translator/c/database.py	(original)
+++ pypy/branch/gc-compress/pypy/translator/c/database.py	Fri Oct  9 13:05:56 2009
@@ -143,7 +143,7 @@
                 return 'struct %s @' % (
                     valid_identifier('pypy_opaque_' + T.tag),)
         elif isinstance(T, llgroup.GroupType):
-            return 'XXX-dont-use-me @'
+            return "/*don't use me*/ void @"
         else:
             raise Exception("don't know about type %r" % (T,))
 

Modified: pypy/branch/gc-compress/pypy/translator/c/node.py
==============================================================================
--- pypy/branch/gc-compress/pypy/translator/c/node.py	(original)
+++ pypy/branch/gc-compress/pypy/translator/c/node.py	Fri Oct  9 13:05:56 2009
@@ -914,6 +914,9 @@
         return self.obj.name
 
     def enum_dependencies(self):
+        # note: for the group used by the GC, it can grow during this phase,
+        # which means that we might not return all members yet.  This is
+        # fixed by finish_tables() in rpython/memory/gctransform/framework.py
         for member in self.obj.members:
             yield member._as_ptr()
 



More information about the Pypy-commit mailing list