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

pedronis at codespeak.net pedronis at codespeak.net
Tue Apr 12 19:35:35 CEST 2005


Author: pedronis
Date: Tue Apr 12 19:35:35 2005
New Revision: 10561

Modified:
   pypy/dist/pypy/annotation/bookkeeper.py
Log:
better safe than sorry



Modified: pypy/dist/pypy/annotation/bookkeeper.py
==============================================================================
--- pypy/dist/pypy/annotation/bookkeeper.py	(original)
+++ pypy/dist/pypy/annotation/bookkeeper.py	Tue Apr 12 19:35:35 2005
@@ -286,6 +286,7 @@
         specialize = getattr(func, '_specialize_', False)
 
         if specialize:
+            base_func = func
             if specialize == 'argtypes':
                 key = short_type_name(args)
                 func = self.specialize_by_key(func, key,
@@ -328,10 +329,11 @@
         # we need to force unifying all past and present results for the site
         # in order to guarantee the more general results invariant.
         if specialize == 'argtypes':
-            prev_r = self.argtypes_spec_callsite_results.get(self.position_key)
+            key = (base_func, self.position_key)
+            prev_r = self.argtypes_spec_callsite_results.get(key)
             if prev_r is not None:
                 r = unionof(prev_r, r)
-            self.argtypes_spec_callsite_results[self.position_key] = r
+            self.argtypes_spec_callsite_results[key] = r
         return r
         
         



More information about the Pypy-commit mailing list