Commits

Armin Rigo committed 8ba326c

Uh, this seems to fix pypy.objspace.test.test_binop_overriding.
I will try to write a unit test and comments for it.

Comments (0)

Files changed (1)

pypy/jit/metainterp/quasiimmut.py

         self.looptokens_wrefs.append(wref_looptoken)
 
     def compress_looptokens_list(self):
-        newlist = []
-        for wref in self.looptokens_wrefs:
-            looptoken = wref()
-            if looptoken is not None and not looptoken.invalidated:
-                newlist.append(wref)
-        self.looptokens_wrefs = newlist
+        self.looptokens_wref = [wref for wref in self.looptokens_wrefs
+                                     if wref() is not None]
         self.compress_limit = (len(self.looptokens_wrefs) + 15) * 2
 
     def invalidate(self):
         self.looptokens_wrefs = []
         for wref in wrefs:
             looptoken = wref()
-            if looptoken is not None and not looptoken.invalidated:
+            if looptoken is not None:
                 looptoken.invalidated = True
                 self.cpu.invalidate_loop(looptoken)
                 if not we_are_translated():