[pypy-svn] r51917 - pypy/branch/jit-refactoring/pypy/jit/codegen/llgraph
cfbolz at codespeak.net
cfbolz at codespeak.net
Thu Feb 28 16:03:14 CET 2008
Author: cfbolz
Date: Thu Feb 28 16:03:13 2008
New Revision: 51917
Modified:
pypy/branch/jit-refactoring/pypy/jit/codegen/llgraph/llimpl.py
Log:
oops. of course graphs can have no returnblock at all
Modified: pypy/branch/jit-refactoring/pypy/jit/codegen/llgraph/llimpl.py
==============================================================================
--- pypy/branch/jit-refactoring/pypy/jit/codegen/llgraph/llimpl.py (original)
+++ pypy/branch/jit-refactoring/pypy/jit/codegen/llgraph/llimpl.py Thu Feb 28 16:03:13 2008
@@ -604,8 +604,9 @@
for block in graph.iterblocks():
if block.exits == () and len(block.inputargs) == 1:
returnblocks[block] = None
- assert len(returnblocks) == 1, "ambiguous return block"
- graph.returnblock = iter(returnblocks).next()
+ if returnblocks:
+ assert len(returnblocks) == 1, "ambiguous return block"
+ graph.returnblock = iter(returnblocks).next()
def _buildgraph(graph):
More information about the Pypy-commit
mailing list