[pypy-commit] pypy optresult-unroll: fix tests

fijal noreply at buildbot.pypy.org
Tue Aug 11 16:56:38 CEST 2015


Author: Maciej Fijalkowski <fijall at gmail.com>
Branch: optresult-unroll
Changeset: r78905:456183623e74
Date: 2015-08-09 11:18 +0200
http://bitbucket.org/pypy/pypy/changeset/456183623e74/

Log:	fix tests

diff --git a/rpython/jit/metainterp/optimizeopt/heap.py b/rpython/jit/metainterp/optimizeopt/heap.py
--- a/rpython/jit/metainterp/optimizeopt/heap.py
+++ b/rpython/jit/metainterp/optimizeopt/heap.py
@@ -198,9 +198,9 @@
     def _getfield(self, opinfo, descr, optheap):
         res = opinfo.getitem(self.index, optheap)
         if isinstance(res, PreambleOp):
+            index = res.preamble_op.getarg(1).getint()
             res = optheap.optimizer.force_op_from_preamble(res)
-            opinfo.setitem(res.getarg(1).getint(), None, res,
-                           optheap=optheap)
+            opinfo.setitem(index, None, res, optheap=optheap)
         return res
 
     def _setfield(self, op, opinfo, optheap):
diff --git a/rpython/jit/metainterp/optimizeopt/test/test_optimizeopt.py b/rpython/jit/metainterp/optimizeopt/test/test_optimizeopt.py
--- a/rpython/jit/metainterp/optimizeopt/test/test_optimizeopt.py
+++ b/rpython/jit/metainterp/optimizeopt/test/test_optimizeopt.py
@@ -7413,8 +7413,8 @@
         jump(p0)
         """
         expected = """
-        [p0]
-        jump(p0)
+        [p0, p1]
+        jump(p0, p1)
         """
         short = """
         [p0]


More information about the pypy-commit mailing list