Armin Rigo committed 1dbcfa2

Document sort_key(). Kill an unused method.

  • Participants
  • Parent commits 9795ec7

Comments (0)

Files changed (2)

File pypy/jit/backend/llgraph/

         return self.extrainfo
     def sort_key(self):
+        """Returns an integer that can be used as a key when sorting the
+        field descrs of a single structure.  The property that this
+        number has is simply that two different field descrs of the same
+        structure give different numbers."""
         return self.ofs
     def is_pointer_field(self):
     def is_array_of_floats(self):
         return self.typeinfo == FLOAT
-    def equals(self, other):
-        if not isinstance(other, Descr):
-            return False
-        return self.sort_key() == other.sort_key()
     def __lt__(self, other):
         raise TypeError("cannot use comparison on Descrs")
     def __le__(self, other):

File pypy/jit/metainterp/

                 d.setdefault(ofs, self.node_escaped)
         if d is not None:
             lst = d.keys()
+            # we always use the "standardized" order of fields
             for ofs in lst: