[pypy-svn] r64044 - pypy/branch/pyjitpl5-simplify/pypy/jit/metainterp/test
fijal at codespeak.net
fijal at codespeak.net
Tue Apr 14 01:30:13 CEST 2009
Author: fijal
Date: Tue Apr 14 01:30:08 2009
New Revision: 64044
Modified:
pypy/branch/pyjitpl5-simplify/pypy/jit/metainterp/test/test_loop.py
Log:
cool, a failing test
Modified: pypy/branch/pyjitpl5-simplify/pypy/jit/metainterp/test/test_loop.py
==============================================================================
--- pypy/branch/pyjitpl5-simplify/pypy/jit/metainterp/test/test_loop.py (original)
+++ pypy/branch/pyjitpl5-simplify/pypy/jit/metainterp/test/test_loop.py Tue Apr 14 01:30:08 2009
@@ -481,3 +481,24 @@
assert res == interpret(1)
# XXX it's unsure how many loops should be there
self.check_loop_count(3)
+
+ def test_path_with_operations_not_from_start(self):
+ jitdriver = JitDriver(greens = ['k'], reds = ['n', 'z'])
+
+ def f(n):
+ k = 0
+ z = 0
+ while n > 0:
+ jitdriver.can_enter_jit(n=n, k=k, z=z)
+ jitdriver.jit_merge_point(n=n, k=k, z=z)
+ k += 1
+ if k == 10:
+ if z == 0 or z == 1:
+ k = 4
+ z += 1
+ else:
+ k = 5
+ z = 0
+ n -= 1
+
+ res = self.meta_interp(f, [100])
More information about the Pypy-commit
mailing list