Author: Raffael Tfirst <raffael.tfi...@gmail.com>
Branch: py3.5-async
Changeset: r85939:5680318123b9
Date: 2016-07-30 22:29 +0200
http://bitbucket.org/pypy/pypy/changeset/5680318123b9/

Log:    Add SETUP_ASYNC_WITH to stackdepth calculation, change stackeffect
        values for SETUP_ and BEFORE_ASYNC_WITH

diff --git a/pypy/interpreter/astcompiler/assemble.py 
b/pypy/interpreter/astcompiler/assemble.py
--- a/pypy/interpreter/astcompiler/assemble.py
+++ b/pypy/interpreter/astcompiler/assemble.py
@@ -419,13 +419,16 @@
                     target_depth -= 2
                 elif (jump_op == ops.SETUP_FINALLY or
                       jump_op == ops.SETUP_EXCEPT or
-                      jump_op == ops.SETUP_WITH):
+                      jump_op == ops.SETUP_WITH or
+                      jump_op == ops.SETUP_ASYNC_WITH):
                     if jump_op == ops.SETUP_FINALLY:
                         target_depth += 4
                     elif jump_op == ops.SETUP_EXCEPT:
                         target_depth += 4
                     elif jump_op == ops.SETUP_WITH:
                         target_depth += 3
+                    elif jump_op == ops.SETUP_ASYNC_WITH:
+                        target_depth += 3
                     if target_depth > self._max_depth:
                         self._max_depth = target_depth
                 elif (jump_op == ops.JUMP_IF_TRUE_OR_POP or
@@ -642,8 +645,8 @@
     ops.DELETE_DEREF: 0,
     
     ops.GET_AWAITABLE: 0,
-    ops.SETUP_ASYNC_WITH: 6,
-    ops.BEFORE_ASYNC_WITH: 1,
+    ops.SETUP_ASYNC_WITH: 2,
+    ops.BEFORE_ASYNC_WITH: -1,
     ops.GET_AITER: 0,
     ops.GET_ANEXT: 1,
     ops.GET_YIELD_FROM_ITER: 0,
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to