[pypy-commit] pypy py3.5: Very obscure fix
arigo
pypy.commits at gmail.com
Thu Aug 18 15:34:54 EDT 2016
Author: Armin Rigo <arigo at tunes.org>
Branch: py3.5
Changeset: r86290:4b361d9f44e2
Date: 2016-08-18 21:34 +0200
http://bitbucket.org/pypy/pypy/changeset/4b361d9f44e2/
Log: Very obscure fix
diff --git a/pypy/interpreter/astcompiler/codegen.py b/pypy/interpreter/astcompiler/codegen.py
--- a/pypy/interpreter/astcompiler/codegen.py
+++ b/pypy/interpreter/astcompiler/codegen.py
@@ -632,6 +632,13 @@
self.emit_op(ops.POP_TOP)
self.emit_op(ops.POP_TOP)
self.emit_op(ops.POP_EXCEPT) # for SETUP_EXCEPT
+ # Manually remove the 'aiter' object from the valuestack.
+ # This POP_TOP is not needed from the point of view of
+ # pyopcode.py, which will pop anything to match the stack
+ # depth of the SETUP_LOOP, but it is needed to make
+ # PythonCodeMaker._stacksize() compute an exact result and not
+ # crash with StackDepthComputationError.
+ self.emit_op(ops.POP_TOP)
self.emit_op(ops.POP_BLOCK) # for SETUP_LOOP
self.emit_jump(ops.JUMP_ABSOLUTE, b_after_loop_else, True)
More information about the pypy-commit
mailing list