[pypy-svn] r69804 - in pypy/trunk/pypy/jit: backend metainterp

arigo at codespeak.net arigo at codespeak.net
Tue Dec 1 15:38:11 CET 2009


Author: arigo
Date: Tue Dec  1 15:38:10 2009
New Revision: 69804

Modified:
   pypy/trunk/pypy/jit/backend/model.py
   pypy/trunk/pypy/jit/metainterp/specnode.py
Log:
We can write "o1 is o2" instead of playing the sort_key()
given a warning big enough in fielddescrof().


Modified: pypy/trunk/pypy/jit/backend/model.py
==============================================================================
--- pypy/trunk/pypy/jit/backend/model.py	(original)
+++ pypy/trunk/pypy/jit/backend/model.py	Tue Dec  1 15:38:10 2009
@@ -108,6 +108,9 @@
 
     @staticmethod
     def fielddescrof(S, fieldname):
+        """Return the Descr corresponding to field 'fieldname' on the
+        structure 'S'.  It is important that this function (at least)
+        caches the results."""
         raise NotImplementedError
 
     @staticmethod

Modified: pypy/trunk/pypy/jit/metainterp/specnode.py
==============================================================================
--- pypy/trunk/pypy/jit/metainterp/specnode.py	(original)
+++ pypy/trunk/pypy/jit/metainterp/specnode.py	Tue Dec  1 15:38:10 2009
@@ -49,7 +49,7 @@
         for i in range(len(self.fields)):
             o1, s1 = self.fields[i]
             o2, s2 = other.fields[i]
-            if not (o1.sort_key() == o2.sort_key() and s1.equals(s2, ge)):
+            if not (o1 is o2 and s1.equals(s2, ge)):
                 return False
         return True
 



More information about the Pypy-commit mailing list