summaryrefslogtreecommitdiff
path: root/tests/src/JIT/Methodical/tailcall_v4/delegateTail.il
blob: be4aac08df27133a66cdf87521b470b2ac49d98b (plain)
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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214



.assembly extern mscorlib
{
  .publickeytoken = (B7 7A 5C 56 19 34 E0 89 )                         
  .ver 4:0:0:0
}
.assembly extern System.Runtime
{
  .publickeytoken = (B7 7A 5C 56 19 34 E0 89 )                         
  .ver 4:0:0:0
}
.assembly repro
{
  .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) 
  .custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78   
                                                                                                             63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 )       
  .hash algorithm 0x00008004
  .ver 0:0:0:0
}
.module repro.exe
.imagebase 0x00400000
.file alignment 0x00000200
.stackreserve 0x00100000
.subsystem 0x0003       
.corflags 0x00000001    



.class public auto ansi sealed beforefieldinit Closure
       extends [mscorlib]System.Object
{
  .field public initonly object[] Constants
  .field public initonly object[] Locals
  .method public hidebysig specialname rtspecialname 
          instance void  .ctor(object[] constants,
                               object[] locals) cil managed
  {
    .maxstack  8
    IL_0000:  ldarg.0
    IL_0001:  call       instance void [mscorlib]System.Object::.ctor()
    IL_0006:  ldarg.0
    IL_0007:  ldarg.1
    IL_0008:  stfld      object[] Closure::Constants
    IL_000d:  ldarg.0
    IL_000e:  ldarg.2
    IL_000f:  stfld      object[] Closure::Locals
    IL_0014:  ret
  } 

  .method public hidebysig instance object 
          FImpl(object o1,
                object o2,
                object o3,
                object o4,
                object o5,
                object o6,
                object o7,
                object o8,
                object o9) cil managed
  {
    .maxstack  8
    IL_0000:  ldarg.0
    IL_0001:  ldfld      object[] Closure::Constants
    IL_0006:  ldc.i4.0
    IL_0007:  ldelem.ref
    IL_0008:  castclass  string[]
    IL_000d:  ret
  } 

  .method public hidebysig instance object 
          GImpl(int32 i1,
                int32 i2,
                int32 i3,
                int32 i4,
                int32 i5,
                int32 i6,
                int32 i7,
                int32 i8,
                int32 i9) cil managed
  {
    .maxstack  10
    IL_0000:  ldarg.0
    IL_0001:  ldfld      object[] Closure::Constants
    IL_0006:  ldc.i4.0
    IL_0007:  ldelem.ref
    IL_0008:  castclass  class [System.Runtime]System.Func`10<object,object,object,object,object,object,object,object,object,object>
    IL_000d:  ldarg.1
    IL_000e:  box        [mscorlib]System.Int32
    IL_0013:  ldarg.2
    IL_0014:  box        [mscorlib]System.Int32
    IL_0019:  ldarg.3
    IL_001a:  box        [mscorlib]System.Int32
    IL_001f:  ldarg.s    i4
    IL_0021:  box        [mscorlib]System.Int32
    IL_0026:  ldarg.s    i5
    IL_0028:  box        [mscorlib]System.Int32
    IL_002d:  ldarg.s    i6
    IL_002f:  box        [mscorlib]System.Int32
    IL_0034:  ldarg.s    i7
    IL_0036:  box        [mscorlib]System.Int32
    IL_003b:  ldarg.s    i8
    IL_003d:  box        [mscorlib]System.Int32
    IL_0042:  ldarg.s    i9
    IL_0044:  box        [mscorlib]System.Int32
    IL_0049:  tail.
              callvirt   instance !9 class [System.Runtime]System.Func`10<object,object,object,object,object,object,object,object,object,object>::Invoke(!0,
                                                                                                                                                      !1,
                                                                                                                                                      !2,
                                                                                                                                                      !3,
                                                                                                                                                      !4,
                                                                                                                                                      !5,
                                                                                                                                                      !6,
                                                                                                                                                      !7,
                                                                                                                                                      !8)
    IL_004f:  ret
  } 

} 

.class private abstract auto ansi sealed beforefieldinit Repro
       extends [mscorlib]System.Object
{
  .method private hidebysig static int32 Main() cil managed
  {
    .entrypoint
    .maxstack  10
    .locals init (class [System.Runtime]System.Func`10<object,object,object,object,object,object,object,object,object,object> V_0,
             class [System.Runtime]System.Func`10<int32,int32,int32,int32,int32,int32,int32,int32,int32,object> V_1,
             object[] V_2,
             string[] V_3,
             object[] V_4)
    IL_0000:  ldc.i4.1
    IL_0001:  newarr     [mscorlib]System.Object
    IL_0006:  stloc.2
    IL_0007:  ldloc.2
    IL_0008:  ldc.i4.0
    IL_0009:  ldc.i4.1
    IL_000a:  newarr     [mscorlib]System.String
    IL_000f:  stloc.3
    IL_0010:  ldloc.3
    IL_0011:  ldc.i4.0
    IL_0012:  ldstr      "a"
    IL_0017:  stelem.ref
    IL_0018:  ldloc.3
    IL_0019:  stelem.ref
    IL_001a:  ldloc.2
    IL_001b:  ldnull
    IL_001c:  newobj     instance void Closure::.ctor(object[],
                                                      object[])
    IL_0021:  ldftn      instance object Closure::FImpl(object,
                                                        object,
                                                        object,
                                                        object,
                                                        object,
                                                        object,
                                                        object,
                                                        object,
                                                        object)
    IL_0027:  newobj     instance void class [System.Runtime]System.Func`10<object,object,object,object,object,object,object,object,object,object>::.ctor(object,
                                                                                                                                                       native int)
    IL_002c:  stloc.0
    IL_002d:  ldc.i4.1
    IL_002e:  newarr     [mscorlib]System.Object
    IL_0033:  stloc.s    V_4
    IL_0035:  ldloc.s    V_4
    IL_0037:  ldc.i4.0
    IL_0038:  ldloc.0
    IL_0039:  stelem.ref
    IL_003a:  ldloc.s    V_4
    IL_003c:  ldnull
    IL_003d:  newobj     instance void Closure::.ctor(object[],
                                                      object[])
    IL_0042:  ldftn      instance object Closure::GImpl(int32,
                                                        int32,
                                                        int32,
                                                        int32,
                                                        int32,
                                                        int32,
                                                        int32,
                                                        int32,
                                                        int32)
    IL_0048:  newobj     instance void class [System.Runtime]System.Func`10<int32,int32,int32,int32,int32,int32,int32,int32,int32,object>::.ctor(object,
                                                                                                                                              native int)
    IL_004d:  stloc.1
    IL_004e:  ldloc.1
    IL_004f:  ldc.i4.1
    IL_0050:  ldc.i4.2
    IL_0051:  ldc.i4.3
    IL_0052:  ldc.i4.4
    IL_0053:  ldc.i4.5
    IL_0054:  ldc.i4.6
    IL_0055:  ldc.i4.7
    IL_0056:  ldc.i4.8
    IL_0057:  ldc.i4.s   9
    IL_0059:  callvirt   instance !9 class [System.Runtime]System.Func`10<int32,int32,int32,int32,int32,int32,int32,int32,int32,object>::Invoke(!0,
                                                                                                                                             !1,
                                                                                                                                             !2,
                                                                                                                                             !3,
                                                                                                                                             !4,
                                                                                                                                             !5,
                                                                                                                                             !6,
                                                                                                                                             !7,
                                                                                                                                             !8)
    IL_005e:  pop
ldc.i4 100
    IL_005f:  ret
  } 

}