[pypy-svn] r7437 - in pypy/trunk/src/pypy: annotation objspace/flow
arigo at codespeak.net
arigo at codespeak.net
Fri Nov 19 13:29:14 CET 2004
Author: arigo
Date: Fri Nov 19 13:29:13 2004
New Revision: 7437
Modified:
pypy/trunk/src/pypy/annotation/model.py
pypy/trunk/src/pypy/objspace/flow/objspace.py
Log:
Oops. This should go with the previous check-in.
Modified: pypy/trunk/src/pypy/annotation/model.py
==============================================================================
--- pypy/trunk/src/pypy/annotation/model.py (original)
+++ pypy/trunk/src/pypy/annotation/model.py Fri Nov 19 13:29:13 2004
@@ -231,6 +231,10 @@
elif ishashable(x) and x in BUILTIN_ANALYZERS:
result = SomeBuiltin(BUILTIN_ANALYZERS[x])
elif callable(x) or isinstance(x, staticmethod): # XXX
+ # maybe 'x' is a method bound to a not-yet-frozen cache? fun fun fun.
+ if (hasattr(x, 'im_self') and isinstance(x.im_self, Cache)
+ and not x.im_self.frozen):
+ x.im_self.freeze()
if hasattr(x, '__self__') and x.__self__ is not None:
s_self = immutablevalue(x.__self__)
del s_self.const # stop infinite recursion getattr<->immutablevalue
Modified: pypy/trunk/src/pypy/objspace/flow/objspace.py
==============================================================================
--- pypy/trunk/src/pypy/objspace/flow/objspace.py (original)
+++ pypy/trunk/src/pypy/objspace/flow/objspace.py Fri Nov 19 13:29:13 2004
@@ -193,8 +193,8 @@
def call_args(self, w_callable, args):
try:
fn = self.unwrap(w_callable)
- sc = self.specialcases[fn]
- except (UnwrapException, KeyError):
+ sc = self.specialcases[fn] # TypeError if 'fn' not hashable
+ except (UnwrapException, KeyError, TypeError):
pass
else:
return sc(self, fn, args)
More information about the Pypy-commit
mailing list