Author: fijal
Branch: 
Changeset: r82422:0d15dde70904
Date: 2016-02-23 11:27 +0100
http://bitbucket.org/pypy/pypy/changeset/0d15dde70904/

Log:    (fijal, cfbolz) finish fixing tests

diff --git a/rpython/jit/metainterp/optimizeopt/test/test_util.py 
b/rpython/jit/metainterp/optimizeopt/test/test_util.py
--- a/rpython/jit/metainterp/optimizeopt/test/test_util.py
+++ b/rpython/jit/metainterp/optimizeopt/test/test_util.py
@@ -514,7 +514,7 @@
         # invent a GUARD_FUTURE_CONDITION to not have to change all tests
         if res.operations[-1].getopnum() == rop.JUMP:
             guard = ResOperation(rop.GUARD_FUTURE_CONDITION, [], None)
-            guard.rd_snapshot = resume.Snapshot(None, [])
+            guard.rd_snapshot = resume.TopSnapshot(None, [], [])
             res.operations.insert(-1, guard)
 
     def assert_equal(self, optimized, expected, text_right=None):
diff --git a/rpython/jit/metainterp/test/test_resume.py 
b/rpython/jit/metainterp/test/test_resume.py
--- a/rpython/jit/metainterp/test/test_resume.py
+++ b/rpython/jit/metainterp/test/test_resume.py
@@ -25,6 +25,7 @@
 from rpython.jit.metainterp.test.strategies import boxlists
 from rpython.rlib.debug import debug_start, debug_stop, debug_print,\
      have_debug_prints
+from rpython.jit.metainterp import resumecode
 
 from hypothesis import given
 
@@ -1142,7 +1143,8 @@
         class MyInfo:
             @staticmethod
             def enumerate_vars(callback_i, callback_r, callback_f, _, index):
-                for tagged in self.numb.code:
+                while index < len(self.numb.code):
+                    tagged, _ = resumecode.numb_next_item(self.numb, index)
                     _, tag = untag(tagged)
                     if tag == TAGVIRTUAL:
                         kind = REF
@@ -1157,6 +1159,13 @@
                         index = callback_f(index, index)
                     else:
                         assert 0
+        size, self.cur_index = resumecode.numb_next_item(self.numb, 0)
+        assert size == 0
+        size, self.cur_index = resumecode.numb_next_item(self.numb, 
self.cur_index)
+        assert size == 0
+        pc, self.cur_index = resumecode.numb_next_item(self.numb, 
self.cur_index)
+        jitcode_pos, self.cur_index = resumecode.numb_next_item(self.numb, 
self.cur_index)
+
         self._prepare_next_section(MyInfo())
         return self.lst
 
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to