[pypy-svn] r43786 - in pypy/branch/kill-ctypes/pypy: annotation rlib
fijal at codespeak.net
fijal at codespeak.net
Mon May 28 15:01:41 CEST 2007
Author: fijal
Date: Mon May 28 15:01:41 2007
New Revision: 43786
Modified:
pypy/branch/kill-ctypes/pypy/annotation/bookkeeper.py
pypy/branch/kill-ctypes/pypy/rlib/nonconst.py
Log:
Fix from the trunk
Modified: pypy/branch/kill-ctypes/pypy/annotation/bookkeeper.py
==============================================================================
--- pypy/branch/kill-ctypes/pypy/annotation/bookkeeper.py (original)
+++ pypy/branch/kill-ctypes/pypy/annotation/bookkeeper.py Mon May 28 15:01:41 2007
@@ -344,7 +344,7 @@
else:
listdef = ListDef(self, s_ImpossibleValue)
for e in x:
- listdef.generalize(self.annotation_from_example(e))
+ listdef.generalize(self.immutablevalue(e, False))
result = SomeList(listdef)
elif tp is dict or tp is r_dict:
if need_const:
@@ -385,8 +385,8 @@
dictdef.dictkey.update_rdict_annotations(s_eqfn,
s_hashfn)
for ek, ev in x.iteritems():
- dictdef.generalize_key(self.annotation_from_example(ek))
- dictdef.generalize_value(self.annotation_from_example(ev))
+ dictdef.generalize_key(self.immutablevalue(ek, False))
+ dictdef.generalize_value(self.immutablevalue(ev, False))
result = SomeDict(dictdef)
elif ishashable(x) and x in BUILTIN_ANALYZERS:
_module = getattr(x,"__module__","unknown")
@@ -449,10 +449,6 @@
result.const = x
return result
- def annotation_from_example(self, x):
- # XXX to kill at some point
- return self.immutablevalue(x, False)
-
def getdesc(self, pyobj):
# get the XxxDesc wrapper for the given Python object, which must be
# one of:
Modified: pypy/branch/kill-ctypes/pypy/rlib/nonconst.py
==============================================================================
--- pypy/branch/kill-ctypes/pypy/rlib/nonconst.py (original)
+++ pypy/branch/kill-ctypes/pypy/rlib/nonconst.py Mon May 28 15:01:41 2007
@@ -22,7 +22,7 @@
def compute_result_annotation(self, arg):
if hasattr(arg, 'const'):
- return self.bookkeeper.annotation_from_example(arg.const)
+ return self.bookkeeper.immutablevalue(arg.const, False)
else:
return arg
More information about the Pypy-commit
mailing list