[pypy-svn] r7516 - pypy/trunk/src/pypy/translator
mgedmin at codespeak.net
mgedmin at codespeak.net
Sat Nov 20 17:00:06 CET 2004
Author: mgedmin
Date: Sat Nov 20 17:00:06 2004
New Revision: 7516
Modified:
pypy/trunk/src/pypy/translator/transform.py
Log:
Ignore partially annotated (aka "blocked") blocks in transform_dead_code.
Modified: pypy/trunk/src/pypy/translator/transform.py
==============================================================================
--- pypy/trunk/src/pypy/translator/transform.py (original)
+++ pypy/trunk/src/pypy/translator/transform.py Sat Nov 20 17:00:06 2004
@@ -314,7 +314,11 @@
"""Remove dead code: these are the blocks that are not annotated at all
because the annotation considered that no conditional jump could reach
them."""
- for block in self.annotated:
+ for block, is_annotated in self.annotated.items():
+ if not is_annotated:
+ # We do not want to accidentally turn blocked blocks into return
+ # blocks
+ continue
for link in block.exits:
if link not in self.links_followed:
lst = list(block.exits)
More information about the Pypy-commit
mailing list