[pypy-commit] pypy py3.5-corowrapper: reverse the order of these two values on the valuestack, as needed for

arigo pypy.commits at gmail.com
Sat Sep 17 15:59:30 EDT 2016


Author: Armin Rigo <arigo at tunes.org>
Branch: py3.5-corowrapper
Changeset: r87195:1e2081d76357
Date: 2016-09-17 21:58 +0200
http://bitbucket.org/pypy/pypy/changeset/1e2081d76357/

Log:	reverse the order of these two values on the valuestack, as needed
	for "async with"

diff --git a/pypy/interpreter/pyopcode.py b/pypy/interpreter/pyopcode.py
--- a/pypy/interpreter/pyopcode.py
+++ b/pypy/interpreter/pyopcode.py
@@ -1161,12 +1161,12 @@
                 self.space.w_None,
                 self.space.w_None,
                 self.space.w_None)
+        self.pushvalue(w_unroller)
         self.pushvalue(w_res)
-        self.pushvalue(w_unroller)
 
     def WITH_CLEANUP_FINISH(self, oparg, next_instr):
+        w_suppress = self.popvalue()
         w_unroller = self.popvalue()
-        w_suppress = self.popvalue()
         if isinstance(w_unroller, SApplicationException):
             if self.space.is_true(w_suppress):
                 # __exit__() returned True -> Swallow the exception.


More information about the pypy-commit mailing list