forked from dotnet/runtime
-
Notifications
You must be signed in to change notification settings - Fork 0
/
boring.il
129 lines (112 loc) · 3.08 KB
/
boring.il
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
.assembly extern System.Runtime { }
.assembly boring { }
.class interface private abstract auto ansi IFoo`1<T>
{
.method public hidebysig newslot abstract virtual instance int32 Frob() cil managed
{
}
.method public hidebysig newslot virtual instance int32 Bark() cil managed
{
ldc.i4.m1
ret
}
}
.class interface private abstract auto ansi IBar
implements class IFoo`1<class [System.Runtime]System.String>,
class IFoo`1<class [System.Runtime]System.Object>,
class IFoo`1<class [System.Runtime]System.ValueType>
{
.method public hidebysig newslot virtual final instance int32 FrobImpl1() cil managed
{
.override class IFoo`1<class [System.Runtime]System.String>::Frob
.override class IFoo`1<class [System.Runtime]System.Object>::Frob
ldc.i4.1
ret
}
.method public hidebysig newslot virtual final instance int32 FrobImpl2() cil managed
{
.override class IFoo`1<class [System.Runtime]System.ValueType>::Frob
ldc.i4.2
ret
}
.method public hidebysig newslot virtual final instance int32 BarkImpl1() cil managed
{
.override class IFoo`1<class [System.Runtime]System.String>::Bark
ldc.i4.3
ret
}
.method public hidebysig newslot virtual final instance int32 BarkImpl2() cil managed
{
.override class IFoo`1<class [System.Runtime]System.ValueType>::Bark
ldc.i4.4
ret
}
}
.class private auto ansi beforefieldinit Fooer
extends [System.Runtime]System.Object
implements IBar
{
.method public hidebysig specialname rtspecialname
instance void .ctor() cil managed
{
ldarg.0
call instance void [System.Runtime]System.Object::.ctor()
ret
}
}
.method public hidebysig static int32 Main() cil managed
{
.entrypoint
newobj instance void class Fooer::.ctor()
callvirt instance int32 class IFoo`1<string>::Frob()
ldc.i4.1
ceq
brtrue IFoo_String_Frob_Okay
ldc.i4.1
ret
IFoo_String_Frob_Okay:
newobj instance void class Fooer::.ctor()
callvirt instance int32 class IFoo`1<object>::Frob()
ldc.i4.1
ceq
brtrue IFoo_Object_Frob_Okay
ldc.i4.2
ret
IFoo_Object_Frob_Okay:
newobj instance void class Fooer::.ctor()
callvirt instance int32 class IFoo`1<class [System.Runtime]System.ValueType>::Frob()
ldc.i4.2
ceq
brtrue IFoo_ValueType_Frob_Okay
ldc.i4.3
ret
IFoo_ValueType_Frob_Okay:
newobj instance void class Fooer::.ctor()
callvirt instance int32 class IFoo`1<string>::Bark()
ldc.i4.3
ceq
brtrue IFoo_String_Bark_Okay
ldc.i4.4
ret
IFoo_String_Bark_Okay:
newobj instance void class Fooer::.ctor()
callvirt instance int32 class IFoo`1<object>::Bark()
ldc.i4.m1
ceq
brtrue IFoo_Object_Bark_Okay
ldc.i4.5
ret
IFoo_Object_Bark_Okay:
newobj instance void class Fooer::.ctor()
callvirt instance int32 class IFoo`1<class [System.Runtime]System.ValueType>::Bark()
ldc.i4.4
ceq
brtrue IFoo_ValueType_Bark_Okay
ldc.i4.6
ret
IFoo_ValueType_Bark_Okay:
ldc.i4 100
ret
}