Author: Maciej Fijalkowski <[email protected]>
Branch: 
Changeset: r79550:a189e6537fca
Date: 2015-09-08 19:11 +0200
http://bitbucket.org/pypy/pypy/changeset/a189e6537fca/

Log:    a failing test

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
@@ -8753,6 +8753,22 @@
         """
         self.optimize_loop(ops, expected)
 
+    def test_virtual_back_and_forth(self):
+        ops = """
+        [p0]
+        p1 = getfield_gc_pure_r(p0, descr=bdescr)
+        ptemp = new_with_vtable(descr=nodesize)
+        setfield_gc(ptemp, p1, descr=nextdescr)
+        p2 = getfield_gc_r(ptemp, descr=nextdescr)
+        ix = getarrayitem_gc_pure_i(p2, 0, descr=arraydescr)
+        pfoo = getfield_gc_r(ptemp, descr=nextdescr)
+        guard_value(pfoo, ConstPtr(myarray)) []
+        ifoo = int_add(ix, 13)
+        escape_n(ix)
+        jump(p0)
+        """
+        self.optimize_loop(ops, ops)
+
 
 class TestLLtype(OptimizeOptTest, LLtypeMixin):
     pass
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
@@ -135,6 +135,7 @@
     node2addr = lltype.cast_opaque_ptr(llmemory.GCREF, node2)
     myptr = lltype.cast_opaque_ptr(llmemory.GCREF, node)
     mynode2 = lltype.malloc(NODE)
+    myarray = lltype.cast_opaque_ptr(llmemory.GCREF, 
lltype.malloc(lltype.GcArray(lltype.Signed), 13))
     mynode2.parent.typeptr = node_vtable
     myptr2 = lltype.cast_opaque_ptr(llmemory.GCREF, mynode2)
     mynode3 = lltype.malloc(NODE2)
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to