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

antocuni at codespeak.net antocuni at codespeak.net
Mon Jun 23 11:38:18 CEST 2008


Author: antocuni
Date: Mon Jun 23 11:38:18 2008
New Revision: 56030

Modified:
   pypy/branch/oo-jit/pypy/translator/simplify.py
Log:
if there are multiple exits, it could not be an infinite loop



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	Mon Jun 23 11:38:18 2008
@@ -84,7 +84,7 @@
                 exit = block1.exits[0]
                 assert block1 is not exit.target, (
                     "the graph contains an empty infinite loop")
-                if exit.target.exits:
+                if len(exit.target.exits) == 1:
                     assert block1 is not exit.target.exits[0].target, (
                         "the graph contains an empty infinite loop")
                 outputargs = []



More information about the Pypy-commit mailing list