[pypy-svn] r47455 - pypy/dist/pypy/rpython/memory/gctransform
cfbolz at codespeak.net
cfbolz at codespeak.net
Sun Oct 14 22:56:06 CEST 2007
Author: cfbolz
Date: Sun Oct 14 22:56:06 2007
New Revision: 47455
Modified:
pypy/dist/pypy/rpython/memory/gctransform/framework.py
Log:
write out a list of typeids and the repr of their types
Modified: pypy/dist/pypy/rpython/memory/gctransform/framework.py
==============================================================================
--- pypy/dist/pypy/rpython/memory/gctransform/framework.py (original)
+++ pypy/dist/pypy/rpython/memory/gctransform/framework.py Sun Oct 14 22:56:06 2007
@@ -394,8 +394,19 @@
newgcdependencies = []
newgcdependencies.append(table)
newgcdependencies.append(ll_static_roots_inside)
+ self.write_typeid_list()
return newgcdependencies
+ def write_typeid_list(self):
+ """write out the list of type ids together with some info"""
+ from pypy.tool.udir import udir
+ # XXX not ideal since it is not per compilation, but per run
+ f = udir.join("typeids.txt").open("w")
+ all = [(typeid, TYPE)
+ for TYPE, typeid in self.layoutbuilder.id_of_type.iteritems()]
+ all.sort()
+ for typeid, TYPE in all:
+ f.write("%s %s\n" % (typeid, TYPE))
def gct_direct_call(self, hop):
if self.collect_analyzer.analyze(hop.spaceop):
More information about the Pypy-commit
mailing list