1. Carl Friedrich Bolz
  2. Pyrolog

Commits

Carl Friedrich Bolz  committed 5c7fe23 Merge

merge

  • Participants
  • Parent commits 36eae21, 4b4aded
  • Branches type-tag-terms

Comments (0)

Files changed (1)

File prolog/interpreter/signature.py

View file
  • Ignore whitespace
 
     @jit.elidable_promote('all')
     def eq(self, other):
+        # slightly evil
+        if jit.isconstant(self):
+            jit.promote(other)
+        elif jit.isconstant(other):
+            jit.promote(self)
         return self is other or (
-                self.name == other.name and
-                self.numargs == other.numargs)
+                self.numargs == other.numargs and
+                self.name == other.name)
 
     @specialize.arg(1)
     def get_extra(self, name):