[pypy-commit] pypy translation-cleanup: Add popvalues()
rlamy
noreply at buildbot.pypy.org
Fri Oct 19 19:53:52 CEST 2012
Author: Ronan Lamy <ronan.lamy at gmail.com>
Branch: translation-cleanup
Changeset: r58255:6d9f1823fbe4
Date: 2012-10-19 17:20 +0100
http://bitbucket.org/pypy/pypy/changeset/6d9f1823fbe4/
Log: Add popvalues()
diff --git a/pypy/objspace/flow/flowcontext.py b/pypy/objspace/flow/flowcontext.py
--- a/pypy/objspace/flow/flowcontext.py
+++ b/pypy/objspace/flow/flowcontext.py
@@ -287,6 +287,11 @@
"settop past the bottom of the stack")
self.locals_stack_w[index] = w_object
+ def popvalues(self, n):
+ values_w = [self.popvalue() for i in range(n)]
+ values_w.reverse()
+ return values_w
+
def peekvalues(self, n):
values_w = [None] * n
base = self.valuestackdepth - n
More information about the pypy-commit
mailing list