[pypy-svn] r16434 - pypy/dist/pypy/interpreter/stablecompiler
arigo at codespeak.net
arigo at codespeak.net
Wed Aug 24 21:31:27 CEST 2005
Author: arigo
Date: Wed Aug 24 21:31:26 2005
New Revision: 16434
Modified:
pypy/dist/pypy/interpreter/stablecompiler/symbols.py
Log:
(hpk, arigo)
Don't de-optimize a function's locals in the presence of non-bare
exec statements.
Modified: pypy/dist/pypy/interpreter/stablecompiler/symbols.py
==============================================================================
--- pypy/dist/pypy/interpreter/stablecompiler/symbols.py (original)
+++ pypy/dist/pypy/interpreter/stablecompiler/symbols.py Wed Aug 24 21:31:26 2005
@@ -242,8 +242,8 @@
self.handle_free_vars(scope, parent)
def visitExec(self, node, parent):
- # XXX check if we are a bare exec
- parent.optimized = 0
+ if not (node.globals or node.locals):
+ parent.optimized = 0 # bare exec statement
for child in node.getChildNodes():
self.visit(child, parent)
More information about the Pypy-commit
mailing list