[pypy-svn] r78555 - pypy/branch/jit-unroll-loops/pypy/jit/metainterp/test

cfbolz at codespeak.net cfbolz at codespeak.net
Sat Oct 30 19:07:33 CEST 2010


Author: cfbolz
Date: Sat Oct 30 19:07:31 2010
New Revision: 78555

Modified:
   pypy/branch/jit-unroll-loops/pypy/jit/metainterp/test/test_optimizeopt.py
Log:
kill tests that are about expanding the fail args. they have nearly nothing to
do with unrolling and still exist in optimizebasic


Modified: pypy/branch/jit-unroll-loops/pypy/jit/metainterp/test/test_optimizeopt.py
==============================================================================
--- pypy/branch/jit-unroll-loops/pypy/jit/metainterp/test/test_optimizeopt.py	(original)
+++ pypy/branch/jit-unroll-loops/pypy/jit/metainterp/test/test_optimizeopt.py	Sat Oct 30 19:07:31 2010
@@ -2527,179 +2527,6 @@
         boxes = reader.consume_boxes()
         self._verify_fail_args(boxes, fdescr.oparse, expectedtext)
 
-    def test_expand_fail_1(self):
-        ops = """
-        [i1, i3]
-        # first rename i3 into i4
-        p1 = new_with_vtable(ConstClass(node_vtable))
-        setfield_gc(p1, i3, descr=valuedescr)
-        i4 = getfield_gc(p1, descr=valuedescr)
-        #
-        i2 = int_add(10, 5)
-        guard_true(i1, descr=fdescr) [i2, i4]
-        jump(i1, i4)
-        """
-        expected = """
-        [i1, i3]
-        guard_true(i1, descr=fdescr) [i3]
-        jump(1, i3)
-        """
-        self.optimize_loop(ops, expected)
-        self.check_expanded_fail_descr('15, i3', rop.GUARD_TRUE)
-
-    def test_expand_fail_2(self):
-        ops = """
-        [i1, i2]
-        p1 = new_with_vtable(ConstClass(node_vtable))
-        setfield_gc(p1, i2, descr=valuedescr)
-        setfield_gc(p1, p1, descr=nextdescr)
-        guard_true(i1, descr=fdescr) [p1]
-        jump(i1, i2)
-        """
-        expected = """
-        [i1, i2]
-        guard_true(i1, descr=fdescr) [i2]
-        jump(1, i2)
-        """
-        self.optimize_loop(ops, expected)
-        self.check_expanded_fail_descr('''ptr
-            where ptr is a node_vtable, valuedescr=i2
-            ''', rop.GUARD_TRUE)
-
-    def test_expand_fail_3(self):
-        ops = """
-        [i1, i2, i3, p3]
-        p1 = new_with_vtable(ConstClass(node_vtable))
-        p2 = new_with_vtable(ConstClass(node_vtable))
-        setfield_gc(p1, 1, descr=valuedescr)
-        setfield_gc(p1, p2, descr=nextdescr)
-        setfield_gc(p2, i2, descr=valuedescr)
-        setfield_gc(p2, p3, descr=nextdescr)
-        guard_true(i1, descr=fdescr) [i3, p1]
-        jump(i2, i1, i3, p3)
-        """
-        expected = """
-        [i1, i2, i3, p3]
-        guard_true(i1, descr=fdescr) [i3, i2, p3]
-        jump(i2, 1, i3, p3)
-        """
-        self.optimize_loop(ops, expected)
-        self.check_expanded_fail_descr('''i3, p1
-            where p1 is a node_vtable, valuedescr=1, nextdescr=p2
-            where p2 is a node_vtable, valuedescr=i2, nextdescr=p3
-            ''', rop.GUARD_TRUE)
-
-    def test_expand_fail_4(self):
-        for arg in ['p1', 'i2,p1', 'p1,p2', 'p2,p1',
-                    'i2,p1,p2', 'i2,p2,p1']:
-            self.setup_method() # humpf
-            ops = """
-            [i1, i2, i3]
-            p1 = new_with_vtable(ConstClass(node_vtable))
-            setfield_gc(p1, i3, descr=valuedescr)
-            i4 = getfield_gc(p1, descr=valuedescr)   # copy of i3
-            p2 = new_with_vtable(ConstClass(node_vtable))
-            setfield_gc(p1, i2, descr=valuedescr)
-            setfield_gc(p1, p2, descr=nextdescr)
-            setfield_gc(p2, i2, descr=valuedescr)
-            guard_true(i1, descr=fdescr) [i4, i3, %s]
-            jump(i1, i2, i3)
-            """
-            expected = """
-            [i1, i2, i3]
-            guard_true(i1, descr=fdescr) [i3, i2]
-            jump(1, i2, i3)
-            """
-            self.optimize_loop(ops % arg, expected)
-            self.check_expanded_fail_descr('''i3, i3, %s
-                where p1 is a node_vtable, valuedescr=i2, nextdescr=p2
-                where p2 is a node_vtable, valuedescr=i2''' % arg,
-                                           rop.GUARD_TRUE)
-
-    def test_expand_fail_5(self):
-        ops = """
-        [i1, i2, i3, i4]
-        p1 = new_with_vtable(ConstClass(node_vtable))
-        p2 = new_with_vtable(ConstClass(node_vtable))
-        setfield_gc(p1, i4, descr=valuedescr)
-        setfield_gc(p1, p2, descr=nextdescr)
-        setfield_gc(p2, i2, descr=valuedescr)
-        setfield_gc(p2, p1, descr=nextdescr)      # a cycle
-        guard_true(i1, descr=fdescr) [i3, i4, p1, p2]
-        jump(i2, i1, i3, i4)
-        """
-        expected = """
-        [i1, i2, i3, i4]
-        guard_true(i1, descr=fdescr) [i3, i4, i2]
-        jump(i2, 1, i3, i4)
-        """
-        self.optimize_loop(ops, expected)
-        self.check_expanded_fail_descr('''i3, i4, p1, p2
-            where p1 is a node_vtable, valuedescr=i4, nextdescr=p2
-            where p2 is a node_vtable, valuedescr=i2, nextdescr=p1
-            ''', rop.GUARD_TRUE)
-
-    def test_expand_fail_6(self):
-        ops = """
-        [p0, i0, i1]
-        guard_true(i0, descr=fdescr) [p0]
-        p1 = new_with_vtable(ConstClass(node_vtable))
-        setfield_gc(p1, i1, descr=valuedescr)
-        jump(p1, i1, i1)
-        """
-        expected = """
-        [i1b, i0, i1]
-        guard_true(i0, descr=fdescr) [i1b]
-        jump(i1, i1, i1)
-        """
-        xxx
-        self.optimize_loop(ops, '''Virtual(node_vtable, valuedescr=Not),
-                                   Not, Not''', expected)
-        self.check_expanded_fail_descr('''p0
-            where p0 is a node_vtable, valuedescr=i1b
-            ''', rop.GUARD_TRUE)
-
-    def test_expand_fail_varray(self):
-        ops = """
-        [i1]
-        p1 = new_array(3, descr=arraydescr)
-        setarrayitem_gc(p1, 1, i1, descr=arraydescr)
-        setarrayitem_gc(p1, 0, 25, descr=arraydescr)
-        guard_true(i1, descr=fdescr) [p1]
-        i2 = getarrayitem_gc(p1, 1, descr=arraydescr)
-        jump(i2)
-        """
-        expected = """
-        [i1]
-        guard_true(i1, descr=fdescr) [i1]
-        jump(1)
-        """
-        self.optimize_loop(ops, expected)
-        self.check_expanded_fail_descr('''p1
-            where p1 is a varray arraydescr: 25, i1
-            ''', rop.GUARD_TRUE)
-
-    def test_expand_fail_vstruct(self):
-        ops = """
-        [i1, p1]
-        p2 = new(descr=ssize)
-        setfield_gc(p2, i1, descr=adescr)
-        setfield_gc(p2, p1, descr=bdescr)
-        guard_true(i1, descr=fdescr) [p2]
-        i3 = getfield_gc(p2, descr=adescr)
-        p3 = getfield_gc(p2, descr=bdescr)
-        jump(i3, p3)
-        """
-        expected = """
-        [i1, p1]
-        guard_true(i1, descr=fdescr) [i1, p1]
-        jump(1, p1)
-        """
-        self.optimize_loop(ops, expected)
-        self.check_expanded_fail_descr('''p2
-            where p2 is a vstruct ssize, adescr=i1, bdescr=p1
-            ''', rop.GUARD_TRUE)
-
     def test_expand_fail_v_all_1(self):
         ops = """
         [i1, p1a, i2]



More information about the Pypy-commit mailing list