Commits

Carl Friedrich Bolz committed 441bfa5

unroll basic_unify of shaped callables correctly

Comments (0)

Files changed (1)

prolog/interpreter/shape.py

         return self.signature().numargs
 
     @objectmodel.specialize.arg(3)
-    def basic_unify(self, other, heap, occurs_check=False):
+    @jit.look_inside_iff(lambda self, other, heap, occurs_check:
+        jit.isvirtual(self) or jit.isvirtual(other) or
+        jit.isconstant(self) or jit.isconstant(other))
+    def basic_unify(self, other, heap, occurs_check):
         if (isinstance(other, ShapedCallableBase) and
                 self.get_shape() is other.get_shape()):
             for i in range(self.size_storage()):