Author: Hakan Ardo <ha...@debian.org> Branch: jit-short_from_state Changeset: r46251:7941f47c4d85 Date: 2011-08-02 20:34 +0200 http://bitbucket.org/pypy/pypy/changeset/7941f47c4d85/
Log: constants diff --git a/pypy/jit/metainterp/test/test_virtualstate.py b/pypy/jit/metainterp/test/test_virtualstate.py --- a/pypy/jit/metainterp/test/test_virtualstate.py +++ b/pypy/jit/metainterp/test/test_virtualstate.py @@ -298,6 +298,31 @@ """ self.optimize_bridge(loops, bridge, expected, 'Loop0', p0=self.myptr) + def test_constant(self): + loops = """ + [p0] + p1 = same_as(ConstPtr(myptr)) + jump(p1) + """, """ + [p0] + p1 = same_as(ConstPtr(myptr2)) + jump(p1) + """, """ + [p0] + jump(p0) + """ + expected = """ + [p0] + jump() + """ + self.optimize_bridge(loops, loops[0], expected, 'Loop0') + self.optimize_bridge(loops, loops[1], expected, 'Loop1') + expected = """ + [p0] + jump(p0) + """ + self.optimize_bridge(loops, loops[2], expected, 'Loop2') + class TestLLtypeGuards(BaseTestGenerateGuards, LLtypeMixin): pass _______________________________________________ pypy-commit mailing list pypy-commit@python.org http://mail.python.org/mailman/listinfo/pypy-commit