[pypy-svn] r71264 - pypy/trunk/pypy/jit/metainterp/test

cfbolz at codespeak.net cfbolz at codespeak.net
Wed Feb 17 11:03:34 CET 2010


Author: cfbolz
Date: Wed Feb 17 11:03:32 2010
New Revision: 71264

Modified:
   pypy/trunk/pypy/jit/metainterp/test/test_recursive.py
Log:
A failing test that recursively traces again and again the same function. All
the assembler pieces that are eventually produced are attached to the same green
key, so it's all a bit useless.


Modified: pypy/trunk/pypy/jit/metainterp/test/test_recursive.py
==============================================================================
--- pypy/trunk/pypy/jit/metainterp/test/test_recursive.py	(original)
+++ pypy/trunk/pypy/jit/metainterp/test/test_recursive.py	Wed Feb 17 11:03:32 2010
@@ -666,6 +666,27 @@
         self.meta_interp(portal, [2], inline=True)
         self.check_history(call_assembler=1)
 
+    @py.test.mark.xfail
+    def test_recursion_cant_call_assembler_directly(self):
+        driver = JitDriver(greens = ['codeno'], reds = ['i', 'j'],
+                           get_printable_location = lambda codeno : str(codeno),
+                           can_inline = lambda codeno : False)
+
+        def portal(codeno, j):
+            i = 0
+            while i < 1:
+                driver.can_enter_jit(codeno=codeno, i=i, j=j)
+                driver.jit_merge_point(codeno=codeno, i=i, j=j)
+                i += 1
+                if j == 0:
+                    return
+                portal(2, j - 1)
+
+        portal(2, 50)
+        self.meta_interp(portal, [2, 20], inline=True)
+        self.check_history(call_assembler=0)
+        self.check_enter_count_at_most(4)
+
     def test_directly_call_assembler_return(self):
         driver = JitDriver(greens = ['codeno'], reds = ['i', 'k'],
                            get_printable_location = lambda codeno : str(codeno),



More information about the Pypy-commit mailing list