[pypy-svn] r9232 - pypy/branch/dist-interpapp/pypy/interpreter
pedronis at codespeak.net
pedronis at codespeak.net
Tue Feb 15 13:36:00 CET 2005
Author: pedronis
Date: Tue Feb 15 13:36:00 2005
New Revision: 9232
Modified:
pypy/branch/dist-interpapp/pypy/interpreter/gateway.py
Log:
introduce miniglobals in BuiltinFrame subclasses construction
Modified: pypy/branch/dist-interpapp/pypy/interpreter/gateway.py
==============================================================================
--- pypy/branch/dist-interpapp/pypy/interpreter/gateway.py (original)
+++ pypy/branch/dist-interpapp/pypy/interpreter/gateway.py Tue Feb 15 13:36:00 2005
@@ -159,6 +159,7 @@
def emit__Arguments(self, el, orig_sig, emit_sig):
cur = emit_sig.through_scope_w
emit_sig.through_scope_w += 2
+ emit_sig.miniglobals['Arguments'] = Arguments
emit_sig.setfastscope.append(
"self.arguments_arg = "
"Arguments.frompacked(self.space,scope_w[%d],scope_w[%d])"
@@ -204,6 +205,7 @@
self.setfastscope = []
self.run_args = []
self.through_scope_w = 0
+ self.miniglobals = {}
def make_frame_class(self):
setfastscope = self.setfastscope
@@ -217,14 +219,14 @@
# Python 2.2 SyntaxError without newline: Bug #501622
setfastscope += '\n'
d = {}
- exec setfastscope in globals(),d
+ exec setfastscope in self.miniglobals, d
exec """
def run(self):
w_result = self.code.func(%s)
if w_result is None:
w_result = self.space.w_None
return w_result
-""" % ','.join(self.run_args) in globals(),d
+""" % ','.join(self.run_args) in self.miniglobals, d
return type("BuiltinFrame_for_%s" % self.name,
(BuiltinFrame,),d)
More information about the Pypy-commit
mailing list