[pypy-svn] r63870 - pypy/branch/pyjitpl5-simplify/pypy/jit/metainterp/test

arigo at codespeak.net arigo at codespeak.net
Wed Apr 8 19:56:22 CEST 2009


Author: arigo
Date: Wed Apr  8 19:56:21 2009
New Revision: 63870

Removed:
   pypy/branch/pyjitpl5-simplify/pypy/jit/metainterp/test/test_inverse_guard.py
Modified:
   pypy/branch/pyjitpl5-simplify/pypy/jit/metainterp/test/test_send.py
Log:
Move the failing test to test_send.  Kill test_inverse_guard.py for now;
I don't see how we can ever have inverse guards without optimize.py,
although there must be a way according to fijal's results with
pypy-c-jit.


Modified: pypy/branch/pyjitpl5-simplify/pypy/jit/metainterp/test/test_send.py
==============================================================================
--- pypy/branch/pyjitpl5-simplify/pypy/jit/metainterp/test/test_send.py	(original)
+++ pypy/branch/pyjitpl5-simplify/pypy/jit/metainterp/test/test_send.py	Wed Apr  8 19:56:21 2009
@@ -418,6 +418,25 @@
         assert res == f(55)
         self.check_tree_loop_count(2)
 
+    def test_bug1(self):
+        py.test.skip("BOOM")
+        myjitdriver = JitDriver(greens = [], reds = ['node', 'n'])
+        def extern(n):
+            if n <= 21:
+                return B(n)
+            else:
+                return A()
+        def f(n):
+            node = A()
+            while n >= 0:
+                myjitdriver.can_enter_jit(node=node, n=n)
+                myjitdriver.jit_merge_point(node=node, n=n)
+                n = node.decr(n)
+                node = extern(n)
+            return n
+        res = self.meta_interp(f, [40], policy=StopAtXPolicy(extern))
+        assert res == f(40)
+
 
 #class TestOOtype(SendTests, OOJitMixin):
 #    pass



More information about the Pypy-commit mailing list