[pypy-svn] r24849 - pypy/branch/explicit-exceptions/translator/backendopt

mwh at codespeak.net mwh at codespeak.net
Thu Mar 23 02:10:11 CET 2006


Author: mwh
Date: Thu Mar 23 02:10:03 2006
New Revision: 24849

Modified:
   pypy/branch/explicit-exceptions/translator/backendopt/inline.py
Log:
call join_blocks *before* we find the callsites -- otherwise we risk finding
callsites in blocks that will soon not be part of the graph.  (too late at
night and too painful to write a test case, sorry).


Modified: pypy/branch/explicit-exceptions/translator/backendopt/inline.py
==============================================================================
--- pypy/branch/explicit-exceptions/translator/backendopt/inline.py	(original)
+++ pypy/branch/explicit-exceptions/translator/backendopt/inline.py	Thu Mar 23 02:10:03 2006
@@ -107,9 +107,10 @@
         self.translator = translator
         self.graph = graph
         self.inline_func = inline_func
-        callsites = find_callsites(graph, inline_func)
         # to simplify exception matching
         join_blocks(graph)
+        # find callsites *after* joining blocks...
+        callsites = find_callsites(graph, inline_func)
         self.block_to_index = {}
         for g, block, i in callsites:
             self.block_to_index.setdefault(block, {})[i] = g



More information about the Pypy-commit mailing list