Commits

David Schneider committed 69f7641

add sanity check (for tests)

Comments (0)

Files changed (1)

pypy/jit/backend/llsupport/rewrite.py

             # ----------
             self.newops.append(op)
         # ---------- FINISH ----------
-        if self.newops[-1].getopnum() == rop.FINISH:
+        if len(self.newops) != 0 and self.newops[-1].getopnum() == rop.FINISH:
             self.handle_finish(self.newops.pop())
         # ----------
         return self.newops