[pypy-svn] rev 2612 - pypy/trunk/src/pypy/annotation

arigo at codespeak.net arigo at codespeak.net
Sat Dec 20 10:02:21 CET 2003


Author: arigo
Date: Sat Dec 20 10:02:20 2003
New Revision: 2612

Modified:
   pypy/trunk/src/pypy/annotation/annset.py
Log:
Don't record dependencies when generalize() is called.


Modified: pypy/trunk/src/pypy/annotation/annset.py
==============================================================================
--- pypy/trunk/src/pypy/annotation/annset.py	(original)
+++ pypy/trunk/src/pypy/annotation/annset.py	Sat Dec 20 10:02:20 2003
@@ -106,7 +106,14 @@
     def generalize(self, predicate, subject, otherpossibleanswer):
         """Generalize the given annotation to also account for the given
         answer."""
-        oldanswer = self.get(predicate, subject)
+        # We shouldn't record a dependency so
+        # we can't just do 'oldanswer = self.get(predicate, subject)'
+        oldanswer = mostgeneralvalue
+        if subject is not mostgeneralvalue:
+            about = self._about(subject)
+            old = about.annotations.get(predicate)
+            if old:
+                oldanswer, dependencies = old
         newanswer = self.merge(oldanswer, otherpossibleanswer)
         if not self.isshared(oldanswer, newanswer):
             self.kill(predicate, subject)


More information about the Pypy-commit mailing list