[pypy-commit] pypy default: Ah, I misread pick_builtin(): it doesn't have the side-effect of adding

arigo noreply at buildbot.pypy.org
Mon Oct 17 10:16:57 CEST 2011


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r48113:e813668eef85
Date: 2011-10-17 10:16 +0200
http://bitbucket.org/pypy/pypy/changeset/e813668eef85/

Log:	Ah, I misread pick_builtin(): it doesn't have the side-effect of
	adding '__builtins__' in the provided w_globals dictionary. Remove,
	and comment.

diff --git a/pypy/module/__builtin__/__init__.py b/pypy/module/__builtin__/__init__.py
--- a/pypy/module/__builtin__/__init__.py
+++ b/pypy/module/__builtin__/__init__.py
@@ -119,7 +119,7 @@
            builtin = space.interpclass_w(w_builtin)
            if isinstance(builtin, module.Module):
                return builtin
-       # no builtin! make a default one.  Given them None, at least.
+       # no builtin! make a default one.  Give them None, at least.
        builtin = module.Module(space, None)
        space.setitem(builtin.w_dict, space.wrap('None'), space.w_None)
        return builtin
diff --git a/pypy/module/__builtin__/compiling.py b/pypy/module/__builtin__/compiling.py
--- a/pypy/module/__builtin__/compiling.py
+++ b/pypy/module/__builtin__/compiling.py
@@ -97,6 +97,9 @@
     elif space.is_w(w_locals, space.w_None):
         w_locals = w_globals
 
-    space.builtin.pick_builtin(w_globals)
+    # xxx removed: adding '__builtins__' to the w_globals dict, if there
+    # is none.  This logic was removed as costly (it requires to get at
+    # the gettopframe_nohidden()).  I bet no test fails, and it's a really
+    # obscure case.
 
     return codeobj.exec_code(space, w_globals, w_locals)


More information about the pypy-commit mailing list