Merge pull request #5714 from alexischr/update_bockbuild
[mono.git] / mono / tests / generic-type-load-exception.2.il
1 .assembly extern mscorlib
2 {
3   .ver 2:0:0:0
4   .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4..
5 }
6 .assembly 'typeloadexcgeneric'
7 {
8   .custom instance void class [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::'.ctor'() =  (
9                 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78   // ....T..WrapNonEx
10                 63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01       ) // ceptionThrows.
11
12   .hash algorithm 0x00008004
13   .ver  0:0:0:0
14 }
15 .module typeloadexcgeneric.exe // GUID = {877F6CE7-B3D8-4CC7-AEB0-DA6A9DB96059}
16
17
18   .class interface private auto ansi abstract IFoo
19   {
20
21     // method line 1
22     .method public virtual  hidebysig  newslot  abstract 
23            instance default int32 A ()  cil managed 
24     {
25         // Method begins at RVA 0x0
26     } // end of method IFoo::A
27
28     // method line 2
29     .method public virtual  hidebysig  newslot  abstract 
30            instance default int32 B ()  cil managed 
31     {
32         // Method begins at RVA 0x0
33     } // end of method IFoo::B
34
35   } // end of class IFoo
36
37   .class private auto ansi beforefieldinit Foo`1<T>
38         extends [mscorlib]System.Object
39         implements IFoo  {
40
41     // method line 3
42     .method public hidebysig  specialname  rtspecialname 
43            instance default void '.ctor' ()  cil managed 
44     {
45         // Method begins at RVA 0x20ec
46         // Code size 7 (0x7)
47         .maxstack 8
48         IL_0000:  ldarg.0 
49         IL_0001:  call instance void object::'.ctor'()
50         IL_0006:  ret 
51     } // end of method Foo`1::.ctor
52
53     // method line 4
54     .method public final  virtual  hidebysig  newslot 
55            instance default int32 A ()  cil managed 
56     {
57         // Method begins at RVA 0x20f4
58         // Code size 2 (0x2)
59         .maxstack 8
60         IL_0000:  ldc.i4.1 
61         IL_0001:  ret 
62     } // end of method Foo`1::A
63   } // end of class Foo`1
64
65   .class private auto ansi beforefieldinit Bar`1<T>
66         extends [mscorlib]System.Object
67   {
68
69     // method line 6
70     .method public hidebysig  specialname  rtspecialname 
71            instance default void '.ctor' ()  cil managed 
72     {
73         // Method begins at RVA 0x20fc
74         // Code size 7 (0x7)
75         .maxstack 8
76         IL_0000:  ldarg.0 
77         IL_0001:  call instance void object::'.ctor'()
78         IL_0006:  ret 
79     } // end of method Bar`1::.ctor
80
81     // method line 7
82     .method public hidebysig 
83            instance default void work ()  cil managed 
84     {
85         // Method begins at RVA 0x2104
86         // Code size 33 (0x21)
87         .maxstack 5
88         .locals init (
89                 class Foo`1<!T> V_0)
90         IL_0000:  newobj instance void class Foo`1<!T>::'.ctor'()
91         IL_0005:  stloc.0 
92         IL_0006:  ldstr "A "
93         IL_000b:  ldloc.0 
94         IL_000c:  callvirt instance int32 class Foo`1<!T>::A()
95         IL_0011:  box [mscorlib]System.Int32
96         IL_0016:  call string string::Concat(object, object)
97         IL_001b:  call void class [mscorlib]System.Console::WriteLine(string)
98         IL_0020:  ret 
99     } // end of method Bar`1::work
100
101   } // end of class Bar`1
102
103   .class public auto ansi beforefieldinit main
104         extends [mscorlib]System.Object
105   {
106
107     // method line 8
108     .method public hidebysig  specialname  rtspecialname 
109            instance default void '.ctor' ()  cil managed 
110     {
111         // Method begins at RVA 0x2134
112         // Code size 7 (0x7)
113         .maxstack 8
114         IL_0000:  ldarg.0 
115         IL_0001:  call instance void object::'.ctor'()
116         IL_0006:  ret 
117     } // end of method main::.ctor
118
119     // method line 9
120     .method public static  hidebysig 
121            default int32 Main ()  cil managed 
122     {
123         // Method begins at RVA 0x213c
124         .entrypoint
125         // Code size 34 (0x22)
126         .maxstack 4
127         .locals init (
128                 class Bar`1<string>     V_0,
129                 int32   V_1)
130         IL_0000:  newobj instance void class Bar`1<string>::'.ctor'()
131         IL_0005:  stloc.0 
132         .try { // 0
133           IL_0006:  ldloc.0 
134           IL_0007:  callvirt instance void class Bar`1<string>::work()
135           IL_000c:  leave IL_001e
136
137         } // end .try 0
138         catch class [mscorlib]System.TypeLoadException { // 0
139           IL_0011:  pop 
140           IL_0012:  ldc.i4.0 
141           IL_0013:  stloc.1 
142           IL_0014:  leave IL_0020
143
144           IL_0019:  leave IL_001e
145
146         } // end handler 0
147         IL_001e:  ldc.i4.1 
148         IL_001f:  ret 
149         IL_0020:  ldloc.1 
150         IL_0021:  ret 
151     } // end of method main::Main
152
153   } // end of class main
154