[pypy-svn] r21889 - pypy/dist/pypy/translator/tool

arigo at codespeak.net arigo at codespeak.net
Tue Jan 10 17:02:18 CET 2006


Author: arigo
Date: Tue Jan 10 17:02:17 2006
New Revision: 21889

Modified:
   pypy/dist/pypy/translator/tool/graphpage.py
Log:
Quick hack: TranslationContext.view() with no graph computed so far was meant
to try to get the graph of the entry point, if any.


Modified: pypy/dist/pypy/translator/tool/graphpage.py
==============================================================================
--- pypy/dist/pypy/translator/tool/graphpage.py	(original)
+++ pypy/dist/pypy/translator/tool/graphpage.py	Tue Jan 10 17:02:17 2006
@@ -123,6 +123,9 @@
                 graphs += graphsof(translator, func)
         else:
             graphs = self.translator.graphs
+            if not graphs and hasattr(translator, 'entrypoint'):
+                graphs = list(graphs)
+                graphs += graphsof(translator, translator.entrypoint)
         gs = [(graph.name, graph) for graph in graphs]
         if self.annotator and self.annotator.blocked_graphs:
             for block, was_annotated in self.annotator.annotated.items():



More information about the Pypy-commit mailing list