2005-12-11 Zoltan Varga <vargaz@gmail.com>
[mono.git] / mono / mini / iltests.il
index 6049db71ad4f0769470c4f6fb8d83b4bbd436725..fd93802fc62b1737c94fd050319698388b4e4c15 100644 (file)
@@ -460,6 +460,14 @@ COND:   ldloc.0
                extends [mscorlib]System.ValueType {
                .field public int32 a
                .field public int32 b
+               .field public int32 b1
+               .field public int32 b2
+               .field public int32 b3
+               .field public int32 b4
+               .field public int32 b5
+               .field public int32 b6
+               .field public int32 b7
+               .field public int32 b8
        }
 
        .method static valuetype Tests/TailCallStruct tail1 (valuetype Tests/TailCallStruct arg) {
@@ -480,6 +488,9 @@ COND:   ldloc.0
        }
 
        .method static valuetype Tests/TailCallStruct tail2 (valuetype Tests/TailCallStruct arg) {
+               ldarg.0
+               call valuetype Tests/TailCallStruct Tests::tail1 (valuetype Tests/TailCallStruct)
+
                ldarg.0
                tail.
                call valuetype Tests/TailCallStruct Tests::tail1 (valuetype Tests/TailCallStruct)
@@ -554,6 +565,15 @@ COND:   ldloc.0
                ret
        }               
 
+       .method public static int32 test_1234_conv_u4 () il managed {
+               .maxstack 16
+
+               ldc.i4 1234
+               conv.u4
+               conv.i4
+               ret
+       }
+
        .method public static int32 test_0_get_type_from_handle_on_bblock_boundary () cil managed 
        {
                .maxstack 16
@@ -680,24 +700,6 @@ COND:   ldloc.0
                        ret
        }
 
-       .class nested private auto ansi sealed beforefieldinit FooStruct 
-               extends [mscorlib]System.ValueType {
-
-               .method public hidebysig specialname rtspecialname instance void .ctor () cil managed {
-                       .maxstack 8
-                       ret
-               }
-       }
-
-       .method public static int32 test_0_newobj_vtype () {
-               .maxstack 8
-
-               newobj instance void Tests/FooStruct::.ctor()
-               pop
-               ldc.i4.0
-               ret
-       }
-
        .method public static int32 test_7_conv_ovf_u8_un () {
        .maxstack  2
         .locals    init (unsigned int64)
@@ -758,4 +760,76 @@ COND:   ldloc.0
                ceq
                ret
        }
+
+       .class nested private auto ansi sealed xxx
+       extends [mscorlib]System.ValueType
+   {
+     .field  public   object a
+
+     .method public hidebysig  specialname  rtspecialname 
+            instance default void .ctor ()  cil managed 
+     {
+                .maxstack 8
+                ret 
+     }
+   } // end of class xxx
+
+       .method public static int32 test_0_newobj_vtype () {
+               .maxstack 6
+               .locals init (
+                       valuetype Tests/xxx V_0
+               )
+
+               newobj instance void valuetype Tests/xxx::.ctor ()
+               stloc.0
+               ldloca.s 0
+               ldfld object Tests/xxx::a
+               brfalse OK
+               ldc.i4.s 1
+               ret
+       OK:
+               ldc.i4.s 0
+               ret
+       }
+
+       .method public static int32 test_1_filters () {
+               .maxstack 16
+               .locals init (
+                       int32 res
+               )
+
+               .try { // 0
+                       .try {
+                               ldstr "OnErrorSub test Exception"
+                               newobj instance void class [mscorlib]System.Exception::.ctor(string)
+                               throw 
+                               leave.s IL_0033
+                       }
+                       filter {
+                               pop
+                               ldc.i4.0
+                               endfilter
+                       } {
+                               pop
+                               // Should not be called
+                               ldc.i4.2
+                               stloc res
+                               leave.s IL_0033
+                       }
+               }
+               filter {
+                       pop
+                       ldc.i4.1
+                       endfilter 
+               } {
+                 pop
+                 ldc.i4.1
+                 stloc res       
+                 leave.s IL_0033
+
+               }
+               IL_0033:
+               ldloc res
+               ret
+       }
 }