[runtime] Synthesize IList and IReadOnlyList for the element type of enum errays...
[mono.git] / mono / tests / delegate-with-null-target.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 'null_dele'
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 null_dele.exe // GUID = {2CEA1DD9-6D58-496F-B44B-D78A7BB13197}
16
17
18   .class public auto ansi sealed Foo
19         extends [mscorlib]System.MulticastDelegate
20   {
21
22     // method line 1
23     .method public hidebysig specialname rtspecialname 
24            instance default void '.ctor' (object A_1, native int A_2)  runtime managed 
25     {
26         // Method begins at RVA 0x0
27           // Disassembly of native methods is not supported
28     } // end of method Foo::.ctor
29
30     // method line 2
31     .method public virtual hidebysig newslot 
32            instance default void Invoke ()  runtime managed 
33     {
34         // Method begins at RVA 0x0
35           // Disassembly of native methods is not supported
36     } // end of method Foo::Invoke
37
38     // method line 3
39     .method public virtual hidebysig newslot 
40            instance default class [mscorlib]System.IAsyncResult BeginInvoke (class [mscorlib]System.AsyncCallback callback, object 'object')  runtime managed 
41     {
42         // Method begins at RVA 0x0
43           // Disassembly of native methods is not supported
44     } // end of method Foo::BeginInvoke
45
46     // method line 4
47     .method public virtual hidebysig newslot 
48            instance default void EndInvoke (class [mscorlib]System.IAsyncResult A_1)  runtime managed 
49     {
50         // Method begins at RVA 0x0
51           // Disassembly of native methods is not supported
52     } // end of method Foo::EndInvoke
53
54   } // end of class Foo
55
56
57   .class public auto ansi sealed Foo2
58         extends [mscorlib]System.MulticastDelegate
59   {
60
61     // method line 1
62     .method public hidebysig specialname rtspecialname 
63            instance default void '.ctor' (object A_1, native int A_2)  runtime managed 
64     {
65         // Method begins at RVA 0x0
66           // Disassembly of native methods is not supported
67     } // end of method Foo::.ctor
68
69     // method line 2
70     .method public virtual hidebysig newslot 
71            instance default void Invoke (Program P_0)  runtime managed 
72     {
73         // Method begins at RVA 0x0
74           // Disassembly of native methods is not supported
75     } // end of method Foo::Invoke
76
77     // method line 3
78     .method public virtual hidebysig newslot 
79            instance default class [mscorlib]System.IAsyncResult BeginInvoke (class [mscorlib]System.AsyncCallback callback, object 'object')  runtime managed 
80     {
81         // Method begins at RVA 0x0
82           // Disassembly of native methods is not supported
83     } // end of method Foo::BeginInvoke
84
85     // method line 4
86     .method public virtual hidebysig newslot 
87            instance default void EndInvoke (class [mscorlib]System.IAsyncResult A_1)  runtime managed 
88     {
89         // Method begins at RVA 0x0
90           // Disassembly of native methods is not supported
91     } // end of method Foo::EndInvoke
92
93   } // end of class Foo
94
95
96   .class private auto ansi beforefieldinit Program
97         extends [mscorlib]System.Object
98   {
99
100     // method line 5
101     .method public hidebysig specialname rtspecialname 
102            instance default void '.ctor' ()  cil managed 
103     {
104         // Method begins at RVA 0x20ec
105         // Code size 7 (0x7)
106         .maxstack 8
107         IL_0000:  ldarg.0 
108         IL_0001:  call instance void object::'.ctor'()
109         IL_0006:  ret 
110     } // end of method Program::.ctor
111
112     // method line 6
113     .method public hidebysig 
114            instance default void Test ()  cil managed 
115     {
116         // Method begins at RVA 0x20f4
117         // Code size 1 (0x1)
118         .maxstack 8
119         IL_0000:  ret 
120     } // end of method Program::Test
121
122     // method line 7
123     .method private static hidebysig 
124            default int32 Main ()  cil managed 
125     {
126         // Method begins at RVA 0x20f8
127                 .entrypoint
128                 // Code size 109 (0x6d)
129                 .maxstack 3
130                 .locals init (class Program     V_0)
131
132                 ldnull 
133                 stloc.0
134
135                 .try {
136                         ldloc.0 
137                         ldftn instance void class Program::Test()
138                         newobj instance void class Foo::'.ctor'(object, native int)
139                         leave ERR_1
140                 }
141                 catch class [mscorlib]System.ArgumentException { // 2
142                         pop 
143                         leave NEXT_1
144                 }
145
146 NEXT_1:
147                 newobj instance void class Program::'.ctor'()
148                 stloc.0 
149                 .try {
150                         ldloc.0 
151                         ldftn instance void class Program::Test()
152                         newobj instance void class Foo::'.ctor'(object, native int)
153                         leave NEXT_2
154                 }
155                 catch class [mscorlib]System.ArgumentException { // 2
156                         pop 
157                         leave ERR_2
158                 }
159
160 NEXT_2:
161
162                 .try {
163                         ldnull
164                         ldftn instance void class Program::Test()
165                         newobj instance void class Foo2::'.ctor'(object, native int)
166                         leave NEXT_3
167                 }
168                 catch class [mscorlib]System.ArgumentException { // 2
169                         pop 
170                         leave ERR_3
171                 }
172
173 NEXT_3:
174                 .try {
175                         ldnull
176                         ldftn instance void class Program::Test()
177                         newobj instance void class Foo::'.ctor'(object, native int)
178                         leave ERR_4
179                 }
180                 catch class [mscorlib]System.ArgumentException { // 2
181                         pop 
182                         leave OK
183                 }
184
185 OK:
186                 ldc.i4.0
187                 ret
188 ERR_1:
189                 ldc.i4.1
190                 ret
191 ERR_2:
192                 ldc.i4.2
193                 ret
194 ERR_3:
195                 ldc.i4.3
196                 ret
197 ERR_4:
198                 ldc.i4.4
199                 ret
200
201         }
202         
203
204
205 }
206