[pypy-svn] r23574 - pypy/dist/pypy/rpython/test

mwh at codespeak.net mwh at codespeak.net
Tue Feb 21 20:28:13 CET 2006


Author: mwh
Date: Tue Feb 21 20:28:11 2006
New Revision: 23574

Modified:
   pypy/dist/pypy/rpython/test/test_normalizecalls.py
Log:
a failing test case: if you have any recursion in your previously rtyped graph
and you try to use the mixlevelannotator ---> boom.



Modified: pypy/dist/pypy/rpython/test/test_normalizecalls.py
==============================================================================
--- pypy/dist/pypy/rpython/test/test_normalizecalls.py	(original)
+++ pypy/dist/pypy/rpython/test/test_normalizecalls.py	Tue Feb 21 20:28:11 2006
@@ -188,3 +188,26 @@
 
         t.checkgraphs()
         return t
+
+    def DONT_test_mix_after_recursion(self):
+        def prefn(n):
+            if n:
+                return 2*prefn(n-1)
+            else:
+                return 1
+        
+        t = TranslationContext()
+        a = t.buildannotator()
+        a.build_types(prefn, [int])
+        typer = t.buildrtyper()
+        typer.specialize()
+        #t.view()
+
+        def f():
+            return 1
+
+        from pypy.rpython import annlowlevel
+        annhelper = annlowlevel.MixLevelHelperAnnotator(typer)               
+        graph = annhelper.getgraph(f, [], annmodel.SomeInteger())
+        annhelper.finish()
+        



More information about the Pypy-commit mailing list