Author: Manuel Jacob <[email protected]>
Branch: 
Changeset: r81690:1984c2224199
Date: 2016-01-12 23:50 +0100
http://bitbucket.org/pypy/pypy/changeset/1984c2224199/

Log:    Let GraphAnalyzer return a conservative result if it encounters a
        function object which is neither external nor has a graph attached.

diff --git a/rpython/translator/backendopt/graphanalyze.py 
b/rpython/translator/backendopt/graphanalyze.py
--- a/rpython/translator/backendopt/graphanalyze.py
+++ b/rpython/translator/backendopt/graphanalyze.py
@@ -90,7 +90,10 @@
                 if self.verbose and x:
                     self.dump_info('analyze_external_call %s: %r' % (op, x))
                 return x
-            graph = funcobj.graph
+            try:
+                graph = funcobj.graph
+            except AttributeError:
+                return self.top_result()
             assert graph is not None
             x = self.analyze_direct_call(graph, seen)
             if self.verbose and x:
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to