[2020-02] Avoid following invalid pointers in mono_w32process_get_modules on Darwin...
[mono-project.git] / mono / tests / dim-abstractcall.il
blob986027a671873c546254b5d7e45c17f0038fc810
2 //  Microsoft (R) .NET Framework IL Disassembler.  Version 4.6.1055.0
3 //  Copyright (c) Microsoft Corporation.  All rights reserved.
7 // Metadata version: v4.0.30319.assembly extern mscorlib { }
8 .assembly abstractcalls { }
10 .class interface public abstract auto ansi I1
12   .method public hidebysig newslot virtual abstract
13           instance int32 Add(int32 x) cil managed
14   {
15   }
18 .class public abstract auto ansi C1
19   extends [mscorlib]System.Object
20   implements I1
22   .method public hidebysig specialname rtspecialname 
23           instance void .ctor() cil managed
24   {
25     ldarg.0
26     call instance void [mscorlib]System.Object::.ctor()
27     ret
28   }
30   .method public hidebysig newslot virtual abstract
31           instance int32 Remove(int32 x) cil managed
32   {
33   }
36 .class public auto ansi C2
37   extends [mscorlib]System.Object
38   implements I1
40   .method public hidebysig specialname rtspecialname 
41           instance void .ctor() cil managed
42   {
43     ldarg.0
44     call instance void C1::.ctor()
45     ret
46   }
48   .method public hidebysig virtual
49           instance int32 Remove(int32 x) cil managed
50   {
51     ldc.i4.0
52     ret
53   }
55   .method public hidebysig newslot virtual
56           instance int32 Add(int32 x) cil managed
57    {
58     ldc.i4.5
59     ret
60   }
63 .method private hidebysig static void CallClass() cil managed
65   newobj instance void C2::.ctor()
66   ldc.i4.0
67   call instance int32 C1::Remove(int32)
68   pop
69   ret
72 .method private hidebysig static void CallInterface() cil managed
74   newobj instance void C2::.ctor()
75   ldc.i4.0
76   call instance int32 I1::Add(int32)
77   pop
78   ret
81 .method private hidebysig static int32 Main() cil managed
83   .entrypoint
85   .try
86   {
87     call void CallClass()
88     leave Fail
89   }
90   catch [System.Runtime]System.BadImageFormatException
91   {
92       leave AbstractClassOK
93   }
95 AbstractClassOK:
97   .try
98   {
99     call void CallInterface()
100     leave Fail
101   }
102   catch [System.Runtime]System.BadImageFormatException
103   {
104     leave AbstractInterfaceOK
105   }
107 AbstractInterfaceOK:
108   ldc.i4 0
109   ret
111 Fail:
112         ldc.i4 155
113     ret