[pypy-svn] r17457 - pypy/dist/pypy/annotation
arigo at codespeak.net
arigo at codespeak.net
Sun Sep 11 13:54:39 CEST 2005
Author: arigo
Date: Sun Sep 11 13:54:39 2005
New Revision: 17457
Modified:
pypy/dist/pypy/annotation/bookkeeper.py
Log:
Oups, forgot to check this in.
Modified: pypy/dist/pypy/annotation/bookkeeper.py
==============================================================================
--- pypy/dist/pypy/annotation/bookkeeper.py (original)
+++ pypy/dist/pypy/annotation/bookkeeper.py Sun Sep 11 13:54:39 2005
@@ -14,6 +14,7 @@
from pypy.interpreter.pycode import cpython_code_signature
from pypy.interpreter.argument import Arguments, ArgErr
from pypy.rpython.rarithmetic import r_uint
+from pypy.rpython.objectmodel import r_dict
from pypy.tool.unionfind import UnionFind
from pypy.rpython import lltype
from pypy.rpython.memory import lladdress
@@ -325,7 +326,7 @@
self.immutable_cache[key] = result
for e in x:
result.listdef.generalize(self.immutablevalue(e))
- elif tp is dict: # exactly a dict
+ elif tp is dict or tp is r_dict:
key = Constant(x)
try:
return self.immutable_cache[key]
@@ -334,6 +335,11 @@
SomeImpossibleValue(),
SomeImpossibleValue()))
self.immutable_cache[key] = result
+ if tp is r_dict:
+ s_eqfn = self.immutablevalue(x.key_eq)
+ s_hashfn = self.immutablevalue(x.key_hash)
+ result.dictdef.dictkey.update_rdict_annotations(s_eqfn,
+ s_hashfn)
for ek, ev in x.iteritems():
result.dictdef.generalize_key(self.immutablevalue(ek))
result.dictdef.generalize_value(self.immutablevalue(ev))
More information about the Pypy-commit
mailing list