[pypy-svn] r54228 - in pypy/branch/oo-jit/pypy: jit/codegen/cli jit/codegen/cli/test jit/codegen/llgraph/test jit/codegen/test translator/cli translator/cli/src

antocuni at codespeak.net antocuni at codespeak.net
Tue Apr 29 12:35:56 CEST 2008


Author: antocuni
Date: Tue Apr 29 12:35:55 2008
New Revision: 54228

Modified:
   pypy/branch/oo-jit/pypy/jit/codegen/cli/operation.py
   pypy/branch/oo-jit/pypy/jit/codegen/cli/rgenop.py
   pypy/branch/oo-jit/pypy/jit/codegen/cli/test/test_rgenop.py
   pypy/branch/oo-jit/pypy/jit/codegen/llgraph/test/test_rgenop.py
   pypy/branch/oo-jit/pypy/jit/codegen/test/rgenop_tests.py
   pypy/branch/oo-jit/pypy/translator/cli/dotnet.py
   pypy/branch/oo-jit/pypy/translator/cli/src/pypylib.cs
Log:
skip or fix all the direct tests



Modified: pypy/branch/oo-jit/pypy/jit/codegen/cli/operation.py
==============================================================================
--- pypy/branch/oo-jit/pypy/jit/codegen/cli/operation.py	(original)
+++ pypy/branch/oo-jit/pypy/jit/codegen/cli/operation.py	Tue Apr 29 12:35:55 2008
@@ -127,7 +127,8 @@
         return None
 
     def emit(self):
-        self.gv_x.load(self.builder)
+        if self.gv_x is not None:
+            self.gv_x.load(self.builder)
         self.builder.il.Emit(OpCodes.Ret)
 
 class Call(Operation):

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	Tue Apr 29 12:35:55 2008
@@ -255,7 +255,9 @@
     @staticmethod
     @specialize.memo()
     def kindToken(T):
-        if T is ootype.Signed:
+        if T is ootype.Void:
+            return None
+        elif T is ootype.Signed:
             return cInt32
         elif T is ootype.Bool:
             return cBoolean
@@ -346,7 +348,7 @@
         self.emit(op)
         return op.gv_res()
 
-    def genop_same_as(self, kindtoken, gv_x):
+    def genop_same_as(self, gv_x):
         op = ops.SameAs(self, gv_x)
         self.emit(op)
         return op.gv_res()
@@ -402,7 +404,7 @@
         myfunc = self.meth.CreateDelegate(self.delegatetype, consts)
         self.gv_entrypoint.holder.SetFunc(myfunc)
 
-    def enter_next_block(self, kinds, args_gv):
+    def enter_next_block(self, args_gv):
         for i in range(len(args_gv)):
             op = ops.SameAs(self, args_gv[i])
             op.emit()

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	Tue Apr 29 12:35:55 2008
@@ -27,6 +27,12 @@
     def test_cast_raising(self):
         py.test.skip('fixme')
 
+    def test_float_adder(self):
+        py.test.skip('fixme')
+
+    def test_float_loop_direct(self):
+        py.test.skip('fixme')
+
     def test_switch_direct(self):
         py.test.skip('no promotion/flexswitch for now please :-)')
 
@@ -39,6 +45,18 @@
     def test_read_frame_var_direct(self):
         py.test.skip('fixme: add support for frames')
 
+    def test_read_frame_var_float_direct(self):
+        py.test.skip('fixme: add support for frames')
+
+    def test_genconst_from_frame_var_direct(self):
+        py.test.skip('fixme: add support for frames')
+
+    def test_write_frame_place_float_direct(self):
+        py.test.skip('fixme: add support for frames')
+        
+    def test_read_float_frame_place_direct(self):
+        py.test.skip('fixme: add support for frames')
+
     def test_write_frame_place_direct(self):
         py.test.skip('fixme: add support for frames')
 

Modified: pypy/branch/oo-jit/pypy/jit/codegen/llgraph/test/test_rgenop.py
==============================================================================
--- pypy/branch/oo-jit/pypy/jit/codegen/llgraph/test/test_rgenop.py	(original)
+++ pypy/branch/oo-jit/pypy/jit/codegen/llgraph/test/test_rgenop.py	Tue Apr 29 12:35:55 2008
@@ -31,7 +31,9 @@
     
 
 class TestLLGraphRGenopDirect(BaseLLGraphRGenop, AbstractRGenOpTestsDirect):
-    pass
+
+    def test_cast_raising(self):
+        py.test.skip('fixme')
 
 class TestLLGraphRGenopCompile(BaseLLGraphRGenop, AbstractRGenOpTestsCompile):
     pass

Modified: pypy/branch/oo-jit/pypy/jit/codegen/test/rgenop_tests.py
==============================================================================
--- pypy/branch/oo-jit/pypy/jit/codegen/test/rgenop_tests.py	(original)
+++ pypy/branch/oo-jit/pypy/jit/codegen/test/rgenop_tests.py	Tue Apr 29 12:35:55 2008
@@ -22,6 +22,7 @@
     FUNC100 = lltype.FuncType([lltype.Signed]*100, lltype.Signed)
     FLOATFUNC = lltype.FuncType([lltype.Float], lltype.Float)
     FUNCMIX = lltype.FuncType([lltype.Signed, lltype.Float], lltype.Float)
+    FUNCV = lltype.FuncType([lltype.Signed], lltype.Void)
 
     @staticmethod
     def Ptr(T):
@@ -46,6 +47,7 @@
     FUNC100 = ootype.StaticMethod([lltype.Signed]*100, lltype.Signed)
     FLOATFUNC = ootype.StaticMethod([lltype.Float], lltype.Float)
     FUNCMIX = ootype.StaticMethod([lltype.Signed, lltype.Float], lltype.Float)
+    FUNCV = ootype.StaticMethod([lltype.Signed], lltype.Void)
 
     @staticmethod
     def Ptr(T):
@@ -1237,11 +1239,9 @@
         assert res == 42
 
 
-
-
     def test_cast_raising(self):
         rgenop = self.RGenOp()
-        FUNC = lltype.FuncType([lltype.Float], lltype.Signed)
+        FUNC = self.T.FLOATFUNC
         sigtoken = rgenop.sigToken(FUNC)
         builder, gv_fn, [gv_x] = rgenop.newgraph(sigtoken, 'cast_raising')
         builder.start_writing()
@@ -2565,8 +2565,7 @@
     def test_void_return(self):
         # XXX minimal test only
         rgenop = self.RGenOp()
-        FUNCV = lltype.FuncType([lltype.Signed], lltype.Void)
-        sigtoken = rgenop.sigToken(FUNCV)
+        sigtoken = rgenop.sigToken(self.T.FUNCV)
         builder, gv_fn, [gv_x] = rgenop.newgraph(sigtoken, "nothing")
         builder.start_writing()
         builder.finish_and_return(sigtoken, None)

Modified: pypy/branch/oo-jit/pypy/translator/cli/dotnet.py
==============================================================================
--- pypy/branch/oo-jit/pypy/translator/cli/dotnet.py	(original)
+++ pypy/branch/oo-jit/pypy/translator/cli/dotnet.py	Tue Apr 29 12:35:55 2008
@@ -711,11 +711,14 @@
 CLR._buildtree()
 
 known_delegates = {
+    ootype.StaticMethod([ootype.Signed, ootype.Float], ootype.Float): CLR.pypy.test.DelegateType_double_int_double,
+    ootype.StaticMethod([ootype.Float], ootype.Float):         CLR.pypy.test.DelegateType_double__double_1,
+    ootype.StaticMethod([ootype.Signed], ootype.Void):         CLR.pypy.test.DelegateType_void_int_1,
     ootype.StaticMethod([ootype.Signed], ootype.Signed):       CLR.pypy.test.DelegateType_int__int_1,
     ootype.StaticMethod([ootype.Signed] * 2, ootype.Signed):   CLR.pypy.test.DelegateType_int__int_2,
     ootype.StaticMethod([ootype.Signed] * 3, ootype.Signed):   CLR.pypy.test.DelegateType_int__int_3,
     ootype.StaticMethod([ootype.Signed] * 5, ootype.Signed):   CLR.pypy.test.DelegateType_int__int_5,
-    ootype.StaticMethod([ootype.Signed] * 27, ootype.Signed):   CLR.pypy.test.DelegateType_int__int_27,
+    ootype.StaticMethod([ootype.Signed] * 27, ootype.Signed):  CLR.pypy.test.DelegateType_int__int_27,
     ootype.StaticMethod([ootype.Signed] * 100, ootype.Signed): CLR.pypy.test.DelegateType_int__int_100
     }
 

Modified: pypy/branch/oo-jit/pypy/translator/cli/src/pypylib.cs
==============================================================================
--- pypy/branch/oo-jit/pypy/translator/cli/src/pypylib.cs	(original)
+++ pypy/branch/oo-jit/pypy/translator/cli/src/pypylib.cs	Tue Apr 29 12:35:55 2008
@@ -82,6 +82,9 @@
         }
     }
 
+    public delegate double DelegateType_double__double_1(double a);
+    public delegate double DelegateType_double_int_double(int a, double b);
+    public delegate void DelegateType_void_int_1(int a);
     public delegate int DelegateType_int__int_1(int a);
     public delegate int DelegateType_int__int_2(int a, int b);
     public delegate int DelegateType_int__int_3(int a, int b, int c);



More information about the Pypy-commit mailing list