[pypy-commit] pypy py3.6: #3066: revert the change in the code, which was not needed after all

arigo pypy.commits at gmail.com
Tue Sep 24 11:51:36 EDT 2019


Author: Armin Rigo <arigo at tunes.org>
Branch: py3.6
Changeset: r97604:63d044a9a08a
Date: 2019-09-24 17:49 +0200
http://bitbucket.org/pypy/pypy/changeset/63d044a9a08a/

Log:	#3066: revert the change in the code, which was not needed after all

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
@@ -226,10 +226,8 @@
     def is_dead_code(self):
         """Return False if any code can be meaningfully added to the
         current block, or True if it would be dead code."""
-        # PyPy2 only returns True after a RETURN_VALUE.  Here we don't even
-        # do that, because otherwise the setter for f_lineno gets very confused.
-        # See test_f_lineno_set_4 in apptest_pyframe.py
-        return False          # self.current_block.have_return
+        # currently only True after a RETURN_VALUE.
+        return self.current_block.have_return
 
     def emit_op(self, op):
         """Emit an opcode without an argument."""


More information about the pypy-commit mailing list