[pypy-svn] r28759 - pypy/dist/pypy/annotation

fijal at codespeak.net fijal at codespeak.net
Tue Jun 13 22:55:22 CEST 2006


Author: fijal
Date: Tue Jun 13 22:55:21 2006
New Revision: 28759

Modified:
   pypy/dist/pypy/annotation/unaryop.py
Log:
Added automatic flowing (needed as well for methodcalls).


Modified: pypy/dist/pypy/annotation/unaryop.py
==============================================================================
--- pypy/dist/pypy/annotation/unaryop.py	(original)
+++ pypy/dist/pypy/annotation/unaryop.py	Tue Jun 13 22:55:21 2006
@@ -630,6 +630,10 @@
         assert s_attr.is_constant()
         attr = s_attr.const
         entry = extregistry.lookup_type(p.knowntype._class_)
+        # we need to flow it, if it's something which can be called
+        if isinstance(s_value, SomePBC):
+            bookkeeper = getbookkeeper()
+            bookkeeper.pbc_call(s_value, bookkeeper.build_args("simple_call", ()))
         entry.set_field_annotation(p.knowntype, attr, s_value)
     
     def find_method(obj, name):



More information about the Pypy-commit mailing list