[pypy-svn] r61797 - in pypy/branch/oo-jit/pypy/jit/codegen/cli: . test

antocuni at codespeak.net antocuni at codespeak.net
Thu Feb 12 17:29:09 CET 2009


Author: antocuni
Date: Thu Feb 12 17:29:08 2009
New Revision: 61797

Modified:
   pypy/branch/oo-jit/pypy/jit/codegen/cli/rgenop.py
   pypy/branch/oo-jit/pypy/jit/codegen/cli/test/test_rgenop.py
Log:
autogen operations that involves a call to a method, like int_abs & co.



Modified: pypy/branch/oo-jit/pypy/jit/codegen/cli/rgenop.py
==============================================================================
--- pypy/branch/oo-jit/pypy/jit/codegen/cli/rgenop.py	(original)
+++ pypy/branch/oo-jit/pypy/jit/codegen/cli/rgenop.py	Thu Feb 12 17:29:08 2009
@@ -812,9 +812,14 @@
         gv_res = op.gv_res()
         return gv_res
 
-##     @specialize.arg(1)
-##     def genraisingop1(self, opname, gv_arg):
-##         return a pair (gv_result, gv_flag_set_if_exception)
+    @specialize.arg(1)
+    def genraisingop1(self, opname, gv_arg):
+        opcls = ops.getopclass1(opname)
+        op = opcls(self.meth, gv_arg)
+        self.appendop(op)
+        gv_res = op.gv_res()
+        gv_excflag = op.gv_excflag()
+        return gv_res, gv_excflag
 
     @specialize.arg(1)
     def genraisingop2(self, opname, gv_arg1, gv_arg2):

Modified: pypy/branch/oo-jit/pypy/jit/codegen/cli/test/test_rgenop.py
==============================================================================
--- pypy/branch/oo-jit/pypy/jit/codegen/cli/test/test_rgenop.py	(original)
+++ pypy/branch/oo-jit/pypy/jit/codegen/cli/test/test_rgenop.py	Thu Feb 12 17:29:08 2009
@@ -69,18 +69,6 @@
     def test_longwinded_and_direct(self):
         py.test.skip('mono 2.2 crashes')
 
-    def test_ovfcheck1_direct(self):
-        import sys
-        # XXX: this test is partly copied from rgenop_tests, because
-        # int_abs_ovf is not yet supported. Delete this method as soon as it
-        # is
-        yield self.ovfcheck1_direct, "int_neg_ovf", [(18, -18),
-                                                     (-18, 18),
-                                                     (sys.maxint, -sys.maxint),
-                                                     (-sys.maxint, sys.maxint),
-                                                     (-sys.maxint-1, None)]
-
-
     def test_cast_direct(self):
         py.test.skip('fixme')
 



More information about the Pypy-commit mailing list