[pypy-commit] pypy default: some rarely used frame methods which we don't have to look inside
gutworth
noreply at buildbot.pypy.org
Sat May 28 03:16:27 CEST 2011
Author: Benjamin Peterson <benjamin at python.org>
Branch:
Changeset: r44562:abce3df08d92
Date: 2011-05-27 20:27 -0500
http://bitbucket.org/pypy/pypy/changeset/abce3df08d92/
Log: some rarely used frame methods which we don't have to look inside
diff --git a/pypy/interpreter/eval.py b/pypy/interpreter/eval.py
--- a/pypy/interpreter/eval.py
+++ b/pypy/interpreter/eval.py
@@ -2,6 +2,7 @@
This module defines the abstract base classes that support execution:
Code and Frame.
"""
+from pypy.rlib import jit
from pypy.interpreter.error import OperationError
from pypy.interpreter.baseobjspace import Wrappable
@@ -97,6 +98,7 @@
"Abstract. Get the expected number of locals."
raise TypeError, "abstract"
+ @jit.dont_look_inside
def fast2locals(self):
# Copy values from self.fastlocals_w to self.w_locals
if self.w_locals is None:
@@ -110,6 +112,7 @@
w_name = self.space.wrap(name)
self.space.setitem(self.w_locals, w_name, w_value)
+ @jit.dont_look_inside
def locals2fast(self):
# Copy values from self.w_locals to self.fastlocals_w
assert self.w_locals is not None
diff --git a/pypy/interpreter/nestedscope.py b/pypy/interpreter/nestedscope.py
--- a/pypy/interpreter/nestedscope.py
+++ b/pypy/interpreter/nestedscope.py
@@ -127,6 +127,7 @@
if self.cells is not None:
self.cells[:ncellvars] = cellvars
+ @jit.dont_look_inside
def fast2locals(self):
super_fast2locals(self)
# cellvars are values exported to inner scopes
@@ -145,6 +146,7 @@
w_name = self.space.wrap(name)
self.space.setitem(self.w_locals, w_name, w_value)
+ @jit.dont_look_inside
def locals2fast(self):
super_locals2fast(self)
freevarnames = self.pycode.co_cellvars + self.pycode.co_freevars
diff --git a/pypy/interpreter/pyframe.py b/pypy/interpreter/pyframe.py
--- a/pypy/interpreter/pyframe.py
+++ b/pypy/interpreter/pyframe.py
@@ -413,6 +413,7 @@
"Get the fast locals as a list."
return self.fastlocals_w
+ @jit.dont_look_inside
def setfastscope(self, scope_w):
"""Initialize the fast locals from a list of values,
where the order is according to self.pycode.signature()."""
More information about the pypy-commit
mailing list