[pypy-svn] r66705 - pypy/branch/pyjitpl5/pypy/jit/metainterp/test
arigo at codespeak.net
arigo at codespeak.net
Thu Jul 30 20:20:09 CEST 2009
Author: arigo
Date: Thu Jul 30 20:20:09 2009
New Revision: 66705
Modified:
pypy/branch/pyjitpl5/pypy/jit/metainterp/test/test_optimizeopt.py
Log:
Another passing test.
Modified: pypy/branch/pyjitpl5/pypy/jit/metainterp/test/test_optimizeopt.py
==============================================================================
--- pypy/branch/pyjitpl5/pypy/jit/metainterp/test/test_optimizeopt.py (original)
+++ pypy/branch/pyjitpl5/pypy/jit/metainterp/test/test_optimizeopt.py Thu Jul 30 20:20:09 2009
@@ -391,6 +391,33 @@
Not''',
expected)
+ def test_p123_anti_nested(self):
+ ops = """
+ [i1, p2, p3]
+ p3sub = getfield_gc(p3, descr=nextdescr)
+ i3 = getfield_gc(p3sub, descr=valuedescr)
+ escape(i3)
+ p1 = new_with_vtable(ConstClass(node_vtable))
+ p2sub = new_with_vtable(ConstClass(node_vtable2))
+ setfield_gc(p2sub, i1, descr=valuedescr)
+ setfield_gc(p2, p2sub, descr=nextdescr)
+ jump(i1, p1, p2)
+ """
+ expected = """
+ [i1, p3]
+ p3sub = getfield_gc(p3, descr=nextdescr)
+ i3 = getfield_gc(p3sub, descr=valuedescr)
+ escape(i3)
+ p2b = new_with_vtable(ConstClass(node_vtable))
+ p2sub = new_with_vtable(ConstClass(node_vtable2))
+ setfield_gc(p2sub, i1, descr=valuedescr)
+ setfield_gc(p2b, p2sub, descr=nextdescr)
+ jump(i1, p2b)
+ """
+ # The same as test_p123_simple, but in the end the "old" p2 contains
+ # a "young" virtual p2sub. Make sure it is all forced.
+ self.optimize_loop(ops, 'Not, Virtual(node_vtable), Not', expected)
+
# ----------
def test_fold_guard_no_exception(self):
More information about the Pypy-commit
mailing list