[pypy-svn] r36723 - pypy/dist/pypy/annotation
fijal at codespeak.net
fijal at codespeak.net
Sun Jan 14 12:24:54 CET 2007
Author: fijal
Date: Sun Jan 14 12:24:51 2007
New Revision: 36723
Modified:
pypy/dist/pypy/annotation/binaryop.py
pypy/dist/pypy/annotation/model.py
pypy/dist/pypy/annotation/signature.py
Log:
Store descriptions for keys of SomeGenericCallable
Modified: pypy/dist/pypy/annotation/binaryop.py
==============================================================================
--- pypy/dist/pypy/annotation/binaryop.py (original)
+++ pypy/dist/pypy/annotation/binaryop.py Sun Jan 14 12:24:51 2007
@@ -691,6 +691,7 @@
s_result = bk.emulate_pbc_call(unique_key, pbc, gencall.args_s)
s_result = unionof(s_result, gencall.s_result)
assert gencall.s_result.contains(s_result)
+ gencall.descriptions.update(pbc.descriptions)
return gencall
class __extend__(pairtype(SomePBC, SomeGenericCallable)):
Modified: pypy/dist/pypy/annotation/model.py
==============================================================================
--- pypy/dist/pypy/annotation/model.py (original)
+++ pypy/dist/pypy/annotation/model.py Sun Jan 14 12:24:51 2007
@@ -399,6 +399,7 @@
def __init__(self, args, result):
self.args_s = args
self.s_result = result
+ self.descriptions = {}
def can_be_None(self):
return True
Modified: pypy/dist/pypy/annotation/signature.py
==============================================================================
--- pypy/dist/pypy/annotation/signature.py (original)
+++ pypy/dist/pypy/annotation/signature.py Sun Jan 14 12:24:51 2007
@@ -20,14 +20,16 @@
return lltype_to_annotation(t)
elif isinstance(t, list):
assert len(t) == 1, "We do not support type joining in list"
- listdef = ListDef(None, annotation(t[0]), mutated=True, resized=True)
+ listdef = ListDef(bookkeeper, annotation(t[0]), mutated=True, resized=True)
return SomeList(listdef)
elif isinstance(t, tuple):
return SomeTuple(tuple([annotation(i) for i in t]))
elif isinstance(t, dict):
+ assert bookkeeper
assert len(t) == 1, "We do not support type joining in dict"
- return SomeDict(DictDef(None, annotation(t.keys()[0]),
+ result = SomeDict(DictDef(bookkeeper, annotation(t.keys()[0]),
annotation(t.values()[0])))
+ return result
elif type(t) is types.NoneType:
return s_None
elif extregistry.is_registered(t):
More information about the Pypy-commit
mailing list