[pypy-svn] r71025 - pypy/trunk/pypy/interpreter
cfbolz at codespeak.net
cfbolz at codespeak.net
Mon Feb 1 11:49:01 CET 2010
Author: cfbolz
Date: Mon Feb 1 11:49:01 2010
New Revision: 71025
Modified:
pypy/trunk/pypy/interpreter/gateway.py
Log:
ouch-ish: the functions in the Python interpreter written at app-level didn't
use a module dict for their globals, which makes the code in them a lot slower
when jitted.
Modified: pypy/trunk/pypy/interpreter/gateway.py
==============================================================================
--- pypy/trunk/pypy/interpreter/gateway.py (original)
+++ pypy/trunk/pypy/interpreter/gateway.py Mon Feb 1 11:49:01 2010
@@ -917,7 +917,7 @@
def build_applevel_dict(self, space):
"NOT_RPYTHON"
from pypy.interpreter.pycode import PyCode
- w_glob = space.newdict()
+ w_glob = space.newdict(module=True)
space.setitem(w_glob, space.wrap('__name__'), space.wrap(self.modname))
space.exec_(self.code, w_glob, w_glob,
hidden_applevel=self.hidden_applevel)
More information about the Pypy-commit
mailing list