[pypy-svn] r75371 - pypy/branch/multijit-4/pypy/jit/metainterp/test

arigo at codespeak.net arigo at codespeak.net
Sun Jun 13 14:08:52 CEST 2010


Author: arigo
Date: Sun Jun 13 14:08:51 2010
New Revision: 75371

Modified:
   pypy/branch/multijit-4/pypy/jit/metainterp/test/test_ztranslation.py
Log:
If the JitDrivers take incompatible greens, we get
an annotation crash.


Modified: pypy/branch/multijit-4/pypy/jit/metainterp/test/test_ztranslation.py
==============================================================================
--- pypy/branch/multijit-4/pypy/jit/metainterp/test/test_ztranslation.py	(original)
+++ pypy/branch/multijit-4/pypy/jit/metainterp/test/test_ztranslation.py	Sun Jun 13 14:08:51 2010
@@ -63,17 +63,18 @@
                 frame.i -= 1
             return total * 10
         #
-        myjitdriver2 = JitDriver(greens = [], reds = ['m', 'x'])
-        def f2(m, x):
+        myjitdriver2 = JitDriver(greens = ['g'], reds = ['m', 'x'],
+                                 can_inline = lambda *args: False)
+        def f2(g, m, x):
             while m > 0:
-                myjitdriver2.can_enter_jit(m=m, x=x)
-                myjitdriver2.jit_merge_point(m=m, x=x)
+                myjitdriver2.can_enter_jit(g=g, m=m, x=x)
+                myjitdriver2.jit_merge_point(g=g, m=m, x=x)
                 m -= 1
                 x += 3
             return x
         #
         def main(i, j):
-            return f(i) - f2(i, j)
+            return f(i) - f2(i+j, i, j)
         res = ll_meta_interp(main, [40, 5], CPUClass=self.CPUClass,
                              type_system=self.type_system)
         assert res == main(40, 5)



More information about the Pypy-commit mailing list