[pypy-svn] r55551 - pypy/branch/oo-jit/pypy/translator

antocuni at codespeak.net antocuni at codespeak.net
Wed Jun 4 12:21:09 CEST 2008


Author: antocuni
Date: Wed Jun  4 12:21:07 2008
New Revision: 55551

Modified:
   pypy/branch/oo-jit/pypy/translator/simplify.py
Log:
prevent eliminate_empty_blocks() from hanging if the graph contains
two empty blocks which link each other



Modified: pypy/branch/oo-jit/pypy/translator/simplify.py
==============================================================================
--- pypy/branch/oo-jit/pypy/translator/simplify.py	(original)
+++ pypy/branch/oo-jit/pypy/translator/simplify.py	Wed Jun  4 12:21:07 2008
@@ -84,6 +84,9 @@
                 exit = block1.exits[0]
                 assert block1 is not exit.target, (
                     "the graph contains an empty infinite loop")
+                if exit.target.exits:
+                    assert block1 is not exit.target.exits[0].target, (
+                        "the graph contains an empty infinite loop")
                 outputargs = []
                 for v in exit.args:
                     if isinstance(v, Variable):



More information about the Pypy-commit mailing list