Author: Hakan Ardo <[email protected]>
Branch:
Changeset: r47697:73ca32141716
Date: 2011-09-30 07:48 +0200
http://bitbucket.org/pypy/pypy/changeset/73ca32141716/
Log: rpython version of this test
diff --git a/pypy/jit/metainterp/test/test_ajit.py
b/pypy/jit/metainterp/test/test_ajit.py
--- a/pypy/jit/metainterp/test/test_ajit.py
+++ b/pypy/jit/metainterp/test/test_ajit.py
@@ -3408,6 +3408,23 @@
assert res == main(1, 10)
self.check_loops(call=0)
+ def test_setarrayitem_followed_by_arraycopy(self):
+ myjitdriver = JitDriver(greens = [], reds = ['n', 'sa', 'x', 'y'])
+ def f(n):
+ sa = 0
+ x = [1,2,n]
+ y = [1,2,3]
+ while n > 0:
+ myjitdriver.jit_merge_point(sa=sa, n=n, x=x, y=y)
+ y[0] = n
+ x[0:3] = y
+ sa += x[0]
+ n -= 1
+ return sa
+ res = self.meta_interp(f, [16])
+ assert res == f(16)
+
+
class TestLLtype(BaseLLtypeTests, LLJitMixin):
def test_tagged(self):
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit