[pypy-svn] r14775 - in pypy/dist/pypy: rpython translator/goal
pedronis at codespeak.net
pedronis at codespeak.net
Tue Jul 19 16:14:42 CEST 2005
Author: pedronis
Date: Tue Jul 19 16:14:38 2005
New Revision: 14775
Added:
pypy/dist/pypy/translator/goal/module-list.pedronis (contents, props changed)
Modified:
pypy/dist/pypy/rpython/rtyper.py
pypy/dist/pypy/translator/goal/order.py
Log:
- let use comments in the module-list and ignore blank lines
- let's specify a module-list file, like RTYPEORDER=order,module-list.pedronis ...
- I'm checking in my module-list as module-list.pedronis, at the end you can see modules that are known to specialize fine
Modified: pypy/dist/pypy/rpython/rtyper.py
==============================================================================
--- pypy/dist/pypy/rpython/rtyper.py (original)
+++ pypy/dist/pypy/rpython/rtyper.py Tue Jul 19 16:14:38 2005
@@ -59,14 +59,17 @@
print '*' * len(s)
except:
self.seed = 0
- try:
- self.order = __import__(os.getenv('RTYPERORDER'), {}, {}, ['*']).order
+ self.order = None
+ RTYPERORDER = os.getenv('RTYPERORDER')
+ if RTYPERORDER:
+ order_module = RTYPERORDER.split(',')[0]
+ self.order = __import__(order_module, {}, {}, ['*']).order
s = 'Using %s.%s for order' % (self.order.__module__, self.order.__name__)
print '*' * len(s)
print s
print '*' * len(s)
- except:
- self.order = None
+
+
def getexceptiondata(self):
Added: pypy/dist/pypy/translator/goal/module-list.pedronis
==============================================================================
--- (empty file)
+++ pypy/dist/pypy/translator/goal/module-list.pedronis Tue Jul 19 16:14:38 2005
@@ -0,0 +1,73 @@
+#
+pypy.objspace.std.listobject
+pypy.objspace.std.listobject:unwrap
+pypy.interpreter.argument
+pypy.interpreter.baseobjspace
+pypy.interpreter.compiler
+pypy.interpreter.error
+pypy.interpreter.eval
+pypy.interpreter.executioncontext
+pypy.interpreter.function
+pypy.interpreter.generator
+pypy.interpreter.mixedmodule
+pypy.interpreter.module
+pypy.interpreter.nestedscope
+pypy.interpreter.pycode
+pypy.interpreter.pyframe
+pypy.interpreter.pytraceback
+pypy.interpreter.special
+pypy.interpreter.typedef
+pypy.module.__builtin__
+pypy.module.__builtin__.compiling
+pypy.module.__builtin__.importing
+pypy.module.__builtin__.operation
+pypy.module.sys
+pypy.module.sys.hook
+pypy.module.sys.state
+pypy.module.sys.vm
+pypy.module.unicodedata.function
+pypy.module.unicodedata.unicodedb
+pypy.objspace.descroperation
+pypy.objspace.std.boolobject
+pypy.objspace.std.booltype
+pypy.objspace.std.default
+pypy.objspace.std.dictobject
+pypy.objspace.std.dictproxyobject
+pypy.objspace.std.dictproxytype
+pypy.objspace.std.dicttype
+pypy.objspace.std.fake
+pypy.objspace.std.floatobject
+pypy.objspace.std.floattype
+pypy.objspace.std.intobject
+pypy.objspace.std.inttype
+pypy.objspace.std.iterobject
+pypy.objspace.std.listsort
+pypy.objspace.std.listtype
+pypy.objspace.std.longobject
+pypy.objspace.std.longtype
+pypy.objspace.std.model
+pypy.objspace.std.multimethod
+pypy.objspace.std.noneobject
+pypy.objspace.std.objecttype
+pypy.objspace.std.objspace
+pypy.objspace.std.register_all
+pypy.objspace.std.sliceobject
+pypy.objspace.std.slicetype
+pypy.objspace.std.stdtypedef
+pypy.objspace.std.stringobject
+pypy.objspace.std.stringtype
+pypy.objspace.std.strutil
+pypy.objspace.std.tupleobject
+pypy.objspace.std.tupletype
+pypy.objspace.std.typeobject
+pypy.objspace.std.typetype
+pypy.objspace.std.unicodeobject
+pypy.objspace.std.unicodetype
+# specialize fine:
+None
+posixpath
+pypy._cache._exceptions_
+pypy.rpython.normalizecalls
+pypy.interpreter.miscutils
+pypy.interpreter.gateway
+pypy.interpreter.pyopcode
Modified: pypy/dist/pypy/translator/goal/order.py
==============================================================================
--- pypy/dist/pypy/translator/goal/order.py (original)
+++ pypy/dist/pypy/translator/goal/order.py Tue Jul 19 16:14:38 2005
@@ -1,12 +1,22 @@
import sys
import os
-lst = open('module-list', 'r')
+RTYPERORDER = os.getenv('RTYPERORDER').split(',')
+if len(RTYPERORDER) == 2:
+ module_list = RTYPERORDER[1]
+else:
+ module_list = 'module-list'
+
+lst = open(module_list, 'r')
try:
- prefixes = lst.read().split()
+ print "reading module-list: %s" % module_list
+ prefixes = lst.readlines()
finally:
lst.close()
+prefixes = [line.strip() for line in prefixes]
+prefixes = [line for line in prefixes if line and not line.startswith('#')]
+
NOMATCH = sys.maxint
def order(annotator, pending):
@@ -40,7 +50,7 @@
def track(block):
module = annotated[block].__module__
if module != cur_module[0]:
- print "Specializing blocks in module: %s" % module
+ print "--- Specializing blocks in module: %s" % module
cur_module[0] = module
return track
More information about the Pypy-commit
mailing list