[pypy-svn] r72216 - pypy/branch/arraycopy/pypy/jit/metainterp/test

fijal at codespeak.net fijal at codespeak.net
Sun Mar 14 04:16:34 CET 2010


Author: fijal
Date: Sun Mar 14 04:16:32 2010
New Revision: 72216

Modified:
   pypy/branch/arraycopy/pypy/jit/metainterp/test/test_optimizeopt.py
Log:
Write another test, which surprisingly passes. I think I'm good with the
situation as it is now and will not try to improve it even further


Modified: pypy/branch/arraycopy/pypy/jit/metainterp/test/test_optimizeopt.py
==============================================================================
--- pypy/branch/arraycopy/pypy/jit/metainterp/test/test_optimizeopt.py	(original)
+++ pypy/branch/arraycopy/pypy/jit/metainterp/test/test_optimizeopt.py	Sun Mar 14 04:16:32 2010
@@ -2755,7 +2755,25 @@
         [i0]
         jump(3)
         '''
-        self.optimize_loop(ops, 'Not', expected)        
+        self.optimize_loop(ops, 'Not', expected)
+
+    def test_arraycopy_not_virtual(self):
+        ops = '''
+        [p0]
+        p1 = new_array(3, descr=arraydescr)
+        p2 = new_array(3, descr=arraydescr)
+        setarrayitem_gc(p1, 2, 10, descr=arraydescr)
+        setarrayitem_gc(p2, 2, 13, descr=arraydescr)
+        arraycopy(0, 0, p1, p2, 0, 0, 3, descr=arraydescr)
+        jump(p2)
+        '''
+        expected = '''
+        [p0]
+        p2 = new_array(3, descr=arraydescr)
+        setarrayitem_gc(p2, 2, 10, descr=arraydescr)
+        jump(p2)
+        '''
+        self.optimize_loop(ops, 'Not', expected)
 
 class TestOOtype(BaseTestOptimizeOpt, OOtypeMixin):
 



More information about the Pypy-commit mailing list