Author: Armin Rigo <[email protected]>
Branch: stmgc-c4
Changeset: r66797:ae319563c727
Date: 2013-09-05 14:12 +0200
http://bitbucket.org/pypy/pypy/changeset/ae319563c727/
Log: Accept DelayedPointers here too
diff --git a/rpython/translator/backendopt/writeanalyze.py
b/rpython/translator/backendopt/writeanalyze.py
--- a/rpython/translator/backendopt/writeanalyze.py
+++ b/rpython/translator/backendopt/writeanalyze.py
@@ -1,5 +1,6 @@
from rpython.flowspace.model import Variable
from rpython.translator.backendopt import graphanalyze
+from rpython.rtyper.lltypesystem import lltype
top_set = object()
empty_set = frozenset()
@@ -48,8 +49,12 @@
return frozenset([("array", TYPE)])
def analyze_external_call(self, op, seen=None):
- funcobj = op.args[0].value._obj
- if getattr(funcobj, 'random_effects_on_gcobjs', False):
+ try:
+ funcobj = op.args[0].value._obj
+ random = funcobj.random_effects_on_gcobjs
+ except (AttributeError, lltype.DelayedPointer):
+ random = True
+ if random:
return self.top_result()
return graphanalyze.GraphAnalyzer.analyze_external_call(self, op, seen)
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit