[pypy-svn] r15461 - in pypy/dist/pypy/translator/llvm2: . test

rxe at codespeak.net rxe at codespeak.net
Sun Jul 31 13:56:17 CEST 2005


Author: rxe
Date: Sun Jul 31 13:56:15 2005
New Revision: 15461

Modified:
   pypy/dist/pypy/translator/llvm2/opwriter.py
   pypy/dist/pypy/translator/llvm2/test/test_exception.py
Log:
Slight modification to make (some) exception tests work again.  It would be
better to go through the database interface than talk directly to nodes - I
guess.



Modified: pypy/dist/pypy/translator/llvm2/opwriter.py
==============================================================================
--- pypy/dist/pypy/translator/llvm2/opwriter.py	(original)
+++ pypy/dist/pypy/translator/llvm2/opwriter.py	Sun Jul 31 13:56:15 2005
@@ -205,13 +205,15 @@
 
         if returntype != "void":
             self.codewriter.invoke(targetvar, returntype, functionref, argrefs,
-                                 argtypes, none_label, exc_label)
+                                   argtypes, none_label, exc_label)
         else:
             self.codewriter.invoke_void(functionref, argrefs, argtypes, none_label, exc_label)
 
         e = self.db._translator.rtyper.getexceptiondata()
-        ll_exception_match        = '%' + e.ll_exception_match.__name__
-        lltype_of_exception_type  = '%structtype.' + e.lltype_of_exception_type.TO.__name__ + '*'
+        ll_exception_match       = '%' + e.ll_exception_match.__name__
+        lltype_of_exception_type = ('%structtype.' +
+                                    e.lltype_of_exception_type.TO.__name__
+                                    + '*')
 
         tmptype1, tmpvar1 = 'sbyte*', self.db.repr_tmpvar()
         tmptype2, tmpvar2 = lltype_of_exception_type, self.db.repr_tmpvar()
@@ -237,7 +239,7 @@
             self.codewriter.call(ll_issubclass_cond,
                                  'bool',
                                  ll_exception_match,
-                                 [etype.ref, tmpvar2],
+                                 [etype.get_ref(), tmpvar2],
                                  [lltype_of_exception_type, lltype_of_exception_type])
             self.codewriter.br(ll_issubclass_cond, not_this_exception_label, exc_found_label)
             self.codewriter.label(not_this_exception_label)

Modified: pypy/dist/pypy/translator/llvm2/test/test_exception.py
==============================================================================
--- pypy/dist/pypy/translator/llvm2/test/test_exception.py	(original)
+++ pypy/dist/pypy/translator/llvm2/test/test_exception.py	Sun Jul 31 13:56:15 2005
@@ -3,9 +3,6 @@
 from pypy.translator.llvm2.genllvm import compile_function
 from pypy.translator.test.snippet import try_raise_choose
 
-def setup_module(module):
-    py.test.skip("tmp - just to sync up changes")
-
 class TestException(Exception):
     pass
 
@@ -171,6 +168,7 @@
         assert f(i) == fn(i)
 
 def test_catch_base_exception():
+    py.test.skip('aborted')    
     #py.test.skip("not working yet, lst[n] raises no exceptions")
     def fn(n):
         lst = range(10)



More information about the Pypy-commit mailing list