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

hakanardo at codespeak.net hakanardo at codespeak.net
Sat Oct 30 19:03:28 CEST 2010


Author: hakanardo
Date: Sat Oct 30 19:03:26 2010
New Revision: 78554

Modified:
   pypy/branch/jit-unroll-loops/pypy/jit/metainterp/test/test_optimizeopt.py
Log:
(armin, hakanardo) fixed tests

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:03:26 2010
@@ -2054,17 +2054,31 @@
         setfield_gc(p1a, p3a, descr=otherdescr)
         jump(p1a)
         """
-        expected = """
-        [p2, p3]
+        preamble = """
+        [p1]
+        guard_nonnull_class(p1, ConstClass(node_vtable2)) []
+        p2 = getfield_gc(p1, descr=nextdescr)
         guard_class(p2, ConstClass(node_vtable)) []
+        p3 = getfield_gc(p1, descr=otherdescr)
         guard_class(p3, ConstClass(node_vtable)) []
+        # p1a = new_with_vtable(ConstClass(node_vtable2))
+        p2a = new_with_vtable(ConstClass(node_vtable))
+        setfield_gc(p3, p2a, descr=otherdescr)
+        p3a = new_with_vtable(ConstClass(node_vtable))
+        escape(p3a)
+        # setfield_gc(p1a, p2a, descr=nextdescr)
+        # setfield_gc(p1a, p3a, descr=otherdescr)
+        jump(p2a, p3a)
+        """
+        expected = """
+        [p2, p3]
         p2a = new_with_vtable(ConstClass(node_vtable))
         setfield_gc(p3, p2a, descr=otherdescr)
         p3a = new_with_vtable(ConstClass(node_vtable))
         escape(p3a)
         jump(p2a, p3a)
         """
-        self.optimize_loop(ops, expected) # XXX was Virtual(node_vtable2, nextdescr=Not, otherdescr=Not)
+        self.optimize_loop(ops, expected, preamble)
 
     def test_invalid_loop_1(self):
         ops = """



More information about the Pypy-commit mailing list