[pypy-svn] r58770 - in pypy/dist/pypy: objspace/std translator/tool

xoraxax at codespeak.net xoraxax at codespeak.net
Tue Oct 7 17:24:17 CEST 2008


Author: xoraxax
Date: Tue Oct  7 17:24:16 2008
New Revision: 58770

Modified:
   pypy/dist/pypy/objspace/std/multimethod.py
   pypy/dist/pypy/translator/tool/staticsizereport.py
Log:
Propagate module name, fix the unknown grpahs functions.

Modified: pypy/dist/pypy/objspace/std/multimethod.py
==============================================================================
--- pypy/dist/pypy/objspace/std/multimethod.py	(original)
+++ pypy/dist/pypy/objspace/std/multimethod.py	Tue Oct  7 17:24:16 2008
@@ -932,6 +932,7 @@
 
         from pypy.rlib.jit import hint
         miniglobals['hint'] = hint
+        miniglobals['__name__'] = __name__
         entry = FuncEntry(bodylines, miniglobals, fallback)
         key = entry.key()
         try:

Modified: pypy/dist/pypy/translator/tool/staticsizereport.py
==============================================================================
--- pypy/dist/pypy/translator/tool/staticsizereport.py	(original)
+++ pypy/dist/pypy/translator/tool/staticsizereport.py	Tue Oct  7 17:24:16 2008
@@ -96,11 +96,10 @@
 
 
 def get_unknown_graphs(database):
-    funcnodes = [node for node in database.globalcontainers()
-                     if node.nodekind == "func"]
+    funcnodes = [node for node in database.globalcontainers() if node.nodekind == "func"]
     for node in funcnodes:
         graph = getattr(node.obj, 'graph', None)
-        if not graph:
+        if not graph or not getattr(graph, 'func', None):
             continue
         if not guess_module(graph):
             yield graph



More information about the Pypy-commit mailing list