[pypy-svn] r42237 - pypy/dist/pypy/lang/prolog/interpreter

cfbolz at codespeak.net cfbolz at codespeak.net
Sat Apr 21 16:44:43 CEST 2007


Author: cfbolz
Date: Sat Apr 21 16:44:42 2007
New Revision: 42237

Modified:
   pypy/dist/pypy/lang/prolog/interpreter/engine.py
Log:
resolve XXX


Modified: pypy/dist/pypy/lang/prolog/interpreter/engine.py
==============================================================================
--- pypy/dist/pypy/lang/prolog/interpreter/engine.py	(original)
+++ pypy/dist/pypy/lang/prolog/interpreter/engine.py	Sat Apr 21 16:44:42 2007
@@ -42,13 +42,11 @@
         return self.vars[index]
 
     def setvar(self, index, val):
-        # XXX check if oldval != val
-        #     it happens all the time in get_last_var_in_chain_and_val()
         oldval = self.vars[index]
         self.vars[index] = val
         # only trail for variables that have a chance to get restored
         # on the last choice point
-        if index < self.last_branch:
+        if index < self.last_branch and oldval is not val:
             self.trail.append((index, oldval))
 
     def branch(self):



More information about the Pypy-commit mailing list