[pypy-svn] r62331 - in pypy/branch/pyjitpl5/pypy/jit/metainterp: . test

arigo at codespeak.net arigo at codespeak.net
Mon Mar 2 11:40:44 CET 2009


Author: arigo
Date: Mon Mar  2 11:40:43 2009
New Revision: 62331

Added:
   pypy/branch/pyjitpl5/pypy/jit/metainterp/test/test_zrpy_exception.py   (contents, props changed)
Modified:
   pypy/branch/pyjitpl5/pypy/jit/metainterp/pyjitpl.py
Log:
A new test, and a fix for a translation issue.


Modified: pypy/branch/pyjitpl5/pypy/jit/metainterp/pyjitpl.py
==============================================================================
--- pypy/branch/pyjitpl5/pypy/jit/metainterp/pyjitpl.py	(original)
+++ pypy/branch/pyjitpl5/pypy/jit/metainterp/pyjitpl.py	Mon Mar  2 11:40:43 2009
@@ -565,10 +565,12 @@
 
     @arguments("int")
     def opimpl_put_last_exception(self, index):
+        assert index >= 0
         self.env.insert(index, self.exception_box)
 
     @arguments("int")
     def opimpl_put_last_exc_value(self, index):
+        assert index >= 0
         self.env.insert(index, self.exc_value_box)
 
     @arguments()

Added: pypy/branch/pyjitpl5/pypy/jit/metainterp/test/test_zrpy_exception.py
==============================================================================
--- (empty file)
+++ pypy/branch/pyjitpl5/pypy/jit/metainterp/test/test_zrpy_exception.py	Mon Mar  2 11:40:43 2009
@@ -0,0 +1,19 @@
+import py
+from pypy.jit.metainterp.test import test_exception
+from pypy.jit.metainterp.test.test_zrpy_basic import LLInterpJitMixin
+
+
+class TestLLExceptions(test_exception.ExceptionTests, LLInterpJitMixin):
+    def interp_operations(self, *args, **kwds):
+        py.test.skip("uses interp_operations()")
+
+    # ==========> test_exception.py
+
+    def test_raise(self): skip1()
+    def test_raise_through(self): skip1()
+    def test_raise_through_wrong_exc(self): skip1()
+    def test_raise_through_wrong_exc_2(self): skip1()
+
+
+def skip1():
+    py.test.skip("the portal always raises, causing blocked blocks")



More information about the Pypy-commit mailing list