[pypy-svn] r64165 - pypy/trunk/pypy/translator

arigo at codespeak.net arigo at codespeak.net
Thu Apr 16 15:25:16 CEST 2009


Author: arigo
Date: Thu Apr 16 15:25:15 2009
New Revision: 64165

Added:
   pypy/trunk/pypy/translator/geninterplevel.py.merge.tmp
      - copied, changed from r64160, pypy/trunk/pypy/translator/geninterplevel.py
Log:
merging of svn+ssh://codespeak.net/svn/pypy/branch/wip-fix-stackless-O2-pickling/pypy/translator/geninterplevel.py
revisions 63853 to 64160:

    ------------------------------------------------------------------------
    r64104 | pedronis | 2009-04-15 17:58:42 +0200 (Wed, 15 Apr 2009) | 4 lines
    
    (cfbolz, pedronis)
    trying to have geninterp help with having unique function names
    
    
    ------------------------------------------------------------------------
    r63865 | pedronis | 2009-04-08 18:42:06 +0200 (Wed, 08 Apr 2009) | 3 lines
    
    making a branch to check-in my WIP work, it is at least not broken with -O0 so something stranger is going on
    
    
    ------------------------------------------------------------------------


Copied: pypy/trunk/pypy/translator/geninterplevel.py.merge.tmp (from r64160, pypy/trunk/pypy/translator/geninterplevel.py)
==============================================================================
--- pypy/trunk/pypy/translator/geninterplevel.py	(original)
+++ pypy/trunk/pypy/translator/geninterplevel.py.merge.tmp	Thu Apr 16 15:25:15 2009
@@ -1231,6 +1231,7 @@
         def install_func(f_name, name):
             yield ''
             yield '  %s = %s' % (f_name, name)
+            yield '  %s.__name__ = %r' % (f_name, f_name)
             #import __builtin__
             #dic = __builtin__.__dict__
             #if dic.get(name):
@@ -1403,7 +1404,7 @@
     RPY_SEP = "#*************************************************************"
 
     RPY_INIT_HEADER = RPY_SEP + '''
-#__name__ = %(modname)r
+__name__ = "_geninterp_"+%(modname)r
 _geninterp_ = True
 
 def init%(modname)s(space):
@@ -1536,7 +1537,7 @@
     newsrc = f.read()
     f.close()
     code = py.code.Source(newsrc).compile()
-    dic = {'__name__': modname}
+    dic = {}
     exec code in dic
     # now we just need to return the init function,
     # which then needs to be called with the space to return the dict.



More information about the Pypy-commit mailing list