Commits

Carl Friedrich Bolz  committed 95306a0

some simplifications

  • Participants
  • Parent commits 1a93f8e
  • Branches compress-terms2

Comments (0)

Files changed (1)

File prolog/interpreter/term.py

 
     def getbinding(self):
         indicator = jit.promote(self.indicator)
-        val = indicator.get(self.parent)
-        if val is self:
-            return None
-        return val
+        return indicator.get(self.parent)
 
     def dereference(self, heap):
         # makes no sense to do path compression here
         return next.dereference(heap)
 
     def setvalue(self, value, heap):
-        # this is true because setvalues on bound VarInTerms don't happen
-        assert self.getbinding() is None
         if heap is not self.created_after_choice_point:
             var = self.created_after_choice_point.newvar()
             var.setvalue(value, heap)
         self.index = index
 
     def get(self, obj):
-        return obj.get_storage(self.index)
+        return None
 
     @staticmethod
     def build(index):