Author: Ronan Lamy <ronan.l...@gmail.com> Branch: kill-ootype Changeset: r65650:76a086e7dd24 Date: 2013-07-25 16:03 +0100 http://bitbucket.org/pypy/pypy/changeset/76a086e7dd24/
Log: Fix/hack handling of delayed pointers in getgraph() 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 @@ -1,3 +1,4 @@ +from rpython.rtyper.lltypesystem.lltype import DelayedPointer from rpython.translator.simplify import get_graph from rpython.tool.algo.unionfind import UnionFind @@ -52,7 +53,10 @@ return self.bottom_result() def analyze_external_call(self, op, seen=None): - funcobj = op.args[0].value._obj + try: + funcobj = op.args[0].value._obj + except DelayedPointer: + return self.bottom_result() result = self.bottom_result() if hasattr(funcobj, '_callbacks'): bk = self.translator.annotator.bookkeeper diff --git a/rpython/translator/simplify.py b/rpython/translator/simplify.py --- a/rpython/translator/simplify.py +++ b/rpython/translator/simplify.py @@ -20,7 +20,10 @@ f = arg.value if not isinstance(f, lltype._ptr): return None - funcobj = f._obj + try: + funcobj = f._getobj() + except lltype.DelayedPointer: + return None try: callable = funcobj._callable except (AttributeError, KeyError, AssertionError): _______________________________________________ pypy-commit mailing list pypy-commit@python.org http://mail.python.org/mailman/listinfo/pypy-commit