1 /* ****************************************************************************
3 * Copyright (c) Microsoft Corporation.
5 * This source code is subject to terms and conditions of the Apache License, Version 2.0. A
6 * copy of the license can be found in the License.html file at the root of this distribution. If
7 * you cannot locate the Apache License, Version 2.0, please send an email to
8 * dlr@microsoft.com. By using this source code in any fashion, you are agreeing to be bound
9 * by the terms of the Apache License, Version 2.0.
11 * You must not remove this notice, or any other, from this software.
14 * ***************************************************************************/
18 using System
.Runtime
.CompilerServices
;
19 using Microsoft
.Scripting
.Utils
;
21 namespace Microsoft
.Scripting
.Interpreter
{
22 internal partial class DynamicInstructionN
{
23 internal static Type
GetDynamicInstructionType(Type delegateType
) {
24 Type
[] argTypes
= delegateType
.GetGenericArguments();
25 if (argTypes
.Length
== 0) return null;
27 Type
[] newArgTypes
= ArrayUtils
.RemoveFirst(argTypes
);
28 switch (newArgTypes
.Length
) {
29 #region Generated Dynamic Instruction Types
31 // *** BEGIN GENERATED CODE ***
32 // generated by function: gen_types from: generate_dynamic_instructions.py
34 case 1: genericType
= typeof(DynamicInstruction
<>); break;
35 case 2: genericType
= typeof(DynamicInstruction
<,>); break;
36 case 3: genericType
= typeof(DynamicInstruction
<,,>); break;
37 case 4: genericType
= typeof(DynamicInstruction
<,,,>); break;
38 case 5: genericType
= typeof(DynamicInstruction
<,,,,>); break;
39 case 6: genericType
= typeof(DynamicInstruction
<,,,,,>); break;
40 case 7: genericType
= typeof(DynamicInstruction
<,,,,,,>); break;
41 case 8: genericType
= typeof(DynamicInstruction
<,,,,,,,>); break;
42 case 9: genericType
= typeof(DynamicInstruction
<,,,,,,,,>); break;
43 case 10: genericType
= typeof(DynamicInstruction
<,,,,,,,,,>); break;
44 case 11: genericType
= typeof(DynamicInstruction
<,,,,,,,,,,>); break;
45 case 12: genericType
= typeof(DynamicInstruction
<,,,,,,,,,,,>); break;
46 case 13: genericType
= typeof(DynamicInstruction
<,,,,,,,,,,,,>); break;
47 case 14: genericType
= typeof(DynamicInstruction
<,,,,,,,,,,,,,>); break;
48 case 15: genericType
= typeof(DynamicInstruction
<,,,,,,,,,,,,,,>); break;
49 case 16: genericType
= typeof(DynamicInstruction
<,,,,,,,,,,,,,,,>); break;
51 // *** END GENERATED CODE ***
55 throw Assert
.Unreachable
;
58 return genericType
.MakeGenericType(newArgTypes
);
61 internal static Instruction
CreateUntypedInstruction(CallSiteBinder binder
, int argCount
) {
62 // DLR Ref.Emits an UpdateAndExecute delegate for sites with more than 10 parameters
63 if (argCount
> 10 && PlatformAdaptationLayer
.IsCompactFramework
) {
68 #region Generated Untyped Dynamic Instructions
70 // *** BEGIN GENERATED CODE ***
71 // generated by function: gen_untyped from: generate_dynamic_instructions.py
73 case 0: return DynamicInstruction
<object>.Factory(binder
);
74 case 1: return DynamicInstruction
<object, object>.Factory(binder
);
75 case 2: return DynamicInstruction
<object, object, object>.Factory(binder
);
76 case 3: return DynamicInstruction
<object, object, object, object>.Factory(binder
);
77 case 4: return DynamicInstruction
<object, object, object, object, object>.Factory(binder
);
78 case 5: return DynamicInstruction
<object, object, object, object, object, object>.Factory(binder
);
79 case 6: return DynamicInstruction
<object, object, object, object, object, object, object>.Factory(binder
);
80 case 7: return DynamicInstruction
<object, object, object, object, object, object, object, object>.Factory(binder
);
81 case 8: return DynamicInstruction
<object, object, object, object, object, object, object, object, object>.Factory(binder
);
82 case 9: return DynamicInstruction
<object, object, object, object, object, object, object, object, object, object>.Factory(binder
);
83 case 10: return DynamicInstruction
<object, object, object, object, object, object, object, object, object, object, object>.Factory(binder
);
84 case 11: return DynamicInstruction
<object, object, object, object, object, object, object, object, object, object, object, object>.Factory(binder
);
85 case 12: return DynamicInstruction
<object, object, object, object, object, object, object, object, object, object, object, object, object>.Factory(binder
);
86 case 13: return DynamicInstruction
<object, object, object, object, object, object, object, object, object, object, object, object, object, object>.Factory(binder
);
87 case 14: return DynamicInstruction
<object, object, object, object, object, object, object, object, object, object, object, object, object, object, object>.Factory(binder
);
88 case 15: return DynamicInstruction
<object, object, object, object, object, object, object, object, object, object, object, object, object, object, object, object>.Factory(binder
);
90 // *** END GENERATED CODE ***
99 #region Generated Dynamic Instructions
101 // *** BEGIN GENERATED CODE ***
102 // generated by function: gen_instructions from: generate_dynamic_instructions.py
104 internal class DynamicInstruction
<TRet
> : Instruction
{
105 private CallSite
<Func
<CallSite
,TRet
>> _site
;
107 public static Instruction
Factory(CallSiteBinder binder
) {
108 return new DynamicInstruction
<TRet
>(CallSite
<Func
<CallSite
,TRet
>>.Create(binder
));
111 private DynamicInstruction(CallSite
<Func
<CallSite
,TRet
>> site
) {
115 public override int ProducedStack { get { return 1; }
}
116 public override int ConsumedStack { get { return 0; }
}
118 public override int Run(InterpretedFrame frame
) {
119 frame
.Data
[frame
.StackIndex
- 0] = _site
.Target(_site
);
120 frame
.StackIndex
-= -1;
124 public override string ToString() {
125 return "Dynamic(" + _site
.Binder
.ToString() + ")";
129 internal class DynamicInstruction
<T0
,TRet
> : Instruction
{
130 private CallSite
<Func
<CallSite
,T0
,TRet
>> _site
;
132 public static Instruction
Factory(CallSiteBinder binder
) {
133 return new DynamicInstruction
<T0
,TRet
>(CallSite
<Func
<CallSite
,T0
,TRet
>>.Create(binder
));
136 private DynamicInstruction(CallSite
<Func
<CallSite
,T0
,TRet
>> site
) {
140 public override int ProducedStack { get { return 1; }
}
141 public override int ConsumedStack { get { return 1; }
}
143 public override int Run(InterpretedFrame frame
) {
144 frame
.Data
[frame
.StackIndex
- 1] = _site
.Target(_site
, (T0
)frame
.Data
[frame
.StackIndex
- 1]);
148 public override string ToString() {
149 return "Dynamic(" + _site
.Binder
.ToString() + ")";
153 internal class DynamicInstruction
<T0
,T1
,TRet
> : Instruction
{
154 private CallSite
<Func
<CallSite
,T0
,T1
,TRet
>> _site
;
156 public static Instruction
Factory(CallSiteBinder binder
) {
157 return new DynamicInstruction
<T0
,T1
,TRet
>(CallSite
<Func
<CallSite
,T0
,T1
,TRet
>>.Create(binder
));
160 private DynamicInstruction(CallSite
<Func
<CallSite
,T0
,T1
,TRet
>> site
) {
164 public override int ProducedStack { get { return 1; }
}
165 public override int ConsumedStack { get { return 2; }
}
167 public override int Run(InterpretedFrame frame
) {
168 frame
.Data
[frame
.StackIndex
- 2] = _site
.Target(_site
, (T0
)frame
.Data
[frame
.StackIndex
- 2], (T1
)frame
.Data
[frame
.StackIndex
- 1]);
169 frame
.StackIndex
-= 1;
173 public override string ToString() {
174 return "Dynamic(" + _site
.Binder
.ToString() + ")";
178 internal class DynamicInstruction
<T0
,T1
,T2
,TRet
> : Instruction
{
179 private CallSite
<Func
<CallSite
,T0
,T1
,T2
,TRet
>> _site
;
181 public static Instruction
Factory(CallSiteBinder binder
) {
182 return new DynamicInstruction
<T0
,T1
,T2
,TRet
>(CallSite
<Func
<CallSite
,T0
,T1
,T2
,TRet
>>.Create(binder
));
185 private DynamicInstruction(CallSite
<Func
<CallSite
,T0
,T1
,T2
,TRet
>> site
) {
189 public override int ProducedStack { get { return 1; }
}
190 public override int ConsumedStack { get { return 3; }
}
192 public override int Run(InterpretedFrame frame
) {
193 frame
.Data
[frame
.StackIndex
- 3] = _site
.Target(_site
, (T0
)frame
.Data
[frame
.StackIndex
- 3], (T1
)frame
.Data
[frame
.StackIndex
- 2], (T2
)frame
.Data
[frame
.StackIndex
- 1]);
194 frame
.StackIndex
-= 2;
198 public override string ToString() {
199 return "Dynamic(" + _site
.Binder
.ToString() + ")";
203 internal class DynamicInstruction
<T0
,T1
,T2
,T3
,TRet
> : Instruction
{
204 private CallSite
<Func
<CallSite
,T0
,T1
,T2
,T3
,TRet
>> _site
;
206 public static Instruction
Factory(CallSiteBinder binder
) {
207 return new DynamicInstruction
<T0
,T1
,T2
,T3
,TRet
>(CallSite
<Func
<CallSite
,T0
,T1
,T2
,T3
,TRet
>>.Create(binder
));
210 private DynamicInstruction(CallSite
<Func
<CallSite
,T0
,T1
,T2
,T3
,TRet
>> site
) {
214 public override int ProducedStack { get { return 1; }
}
215 public override int ConsumedStack { get { return 4; }
}
217 public override int Run(InterpretedFrame frame
) {
218 frame
.Data
[frame
.StackIndex
- 4] = _site
.Target(_site
, (T0
)frame
.Data
[frame
.StackIndex
- 4], (T1
)frame
.Data
[frame
.StackIndex
- 3], (T2
)frame
.Data
[frame
.StackIndex
- 2], (T3
)frame
.Data
[frame
.StackIndex
- 1]);
219 frame
.StackIndex
-= 3;
223 public override string ToString() {
224 return "Dynamic(" + _site
.Binder
.ToString() + ")";
228 internal class DynamicInstruction
<T0
,T1
,T2
,T3
,T4
,TRet
> : Instruction
{
229 private CallSite
<Func
<CallSite
,T0
,T1
,T2
,T3
,T4
,TRet
>> _site
;
231 public static Instruction
Factory(CallSiteBinder binder
) {
232 return new DynamicInstruction
<T0
,T1
,T2
,T3
,T4
,TRet
>(CallSite
<Func
<CallSite
,T0
,T1
,T2
,T3
,T4
,TRet
>>.Create(binder
));
235 private DynamicInstruction(CallSite
<Func
<CallSite
,T0
,T1
,T2
,T3
,T4
,TRet
>> site
) {
239 public override int ProducedStack { get { return 1; }
}
240 public override int ConsumedStack { get { return 5; }
}
242 public override int Run(InterpretedFrame frame
) {
243 frame
.Data
[frame
.StackIndex
- 5] = _site
.Target(_site
, (T0
)frame
.Data
[frame
.StackIndex
- 5], (T1
)frame
.Data
[frame
.StackIndex
- 4], (T2
)frame
.Data
[frame
.StackIndex
- 3], (T3
)frame
.Data
[frame
.StackIndex
- 2], (T4
)frame
.Data
[frame
.StackIndex
- 1]);
244 frame
.StackIndex
-= 4;
248 public override string ToString() {
249 return "Dynamic(" + _site
.Binder
.ToString() + ")";
253 internal class DynamicInstruction
<T0
,T1
,T2
,T3
,T4
,T5
,TRet
> : Instruction
{
254 private CallSite
<Func
<CallSite
,T0
,T1
,T2
,T3
,T4
,T5
,TRet
>> _site
;
256 public static Instruction
Factory(CallSiteBinder binder
) {
257 return new DynamicInstruction
<T0
,T1
,T2
,T3
,T4
,T5
,TRet
>(CallSite
<Func
<CallSite
,T0
,T1
,T2
,T3
,T4
,T5
,TRet
>>.Create(binder
));
260 private DynamicInstruction(CallSite
<Func
<CallSite
,T0
,T1
,T2
,T3
,T4
,T5
,TRet
>> site
) {
264 public override int ProducedStack { get { return 1; }
}
265 public override int ConsumedStack { get { return 6; }
}
267 public override int Run(InterpretedFrame frame
) {
268 frame
.Data
[frame
.StackIndex
- 6] = _site
.Target(_site
, (T0
)frame
.Data
[frame
.StackIndex
- 6], (T1
)frame
.Data
[frame
.StackIndex
- 5], (T2
)frame
.Data
[frame
.StackIndex
- 4], (T3
)frame
.Data
[frame
.StackIndex
- 3], (T4
)frame
.Data
[frame
.StackIndex
- 2], (T5
)frame
.Data
[frame
.StackIndex
- 1]);
269 frame
.StackIndex
-= 5;
273 public override string ToString() {
274 return "Dynamic(" + _site
.Binder
.ToString() + ")";
278 internal class DynamicInstruction
<T0
,T1
,T2
,T3
,T4
,T5
,T6
,TRet
> : Instruction
{
279 private CallSite
<Func
<CallSite
,T0
,T1
,T2
,T3
,T4
,T5
,T6
,TRet
>> _site
;
281 public static Instruction
Factory(CallSiteBinder binder
) {
282 return new DynamicInstruction
<T0
,T1
,T2
,T3
,T4
,T5
,T6
,TRet
>(CallSite
<Func
<CallSite
,T0
,T1
,T2
,T3
,T4
,T5
,T6
,TRet
>>.Create(binder
));
285 private DynamicInstruction(CallSite
<Func
<CallSite
,T0
,T1
,T2
,T3
,T4
,T5
,T6
,TRet
>> site
) {
289 public override int ProducedStack { get { return 1; }
}
290 public override int ConsumedStack { get { return 7; }
}
292 public override int Run(InterpretedFrame frame
) {
293 frame
.Data
[frame
.StackIndex
- 7] = _site
.Target(_site
, (T0
)frame
.Data
[frame
.StackIndex
- 7], (T1
)frame
.Data
[frame
.StackIndex
- 6], (T2
)frame
.Data
[frame
.StackIndex
- 5], (T3
)frame
.Data
[frame
.StackIndex
- 4], (T4
)frame
.Data
[frame
.StackIndex
- 3], (T5
)frame
.Data
[frame
.StackIndex
- 2], (T6
)frame
.Data
[frame
.StackIndex
- 1]);
294 frame
.StackIndex
-= 6;
298 public override string ToString() {
299 return "Dynamic(" + _site
.Binder
.ToString() + ")";
303 internal class DynamicInstruction
<T0
,T1
,T2
,T3
,T4
,T5
,T6
,T7
,TRet
> : Instruction
{
304 private CallSite
<Func
<CallSite
,T0
,T1
,T2
,T3
,T4
,T5
,T6
,T7
,TRet
>> _site
;
306 public static Instruction
Factory(CallSiteBinder binder
) {
307 return new DynamicInstruction
<T0
,T1
,T2
,T3
,T4
,T5
,T6
,T7
,TRet
>(CallSite
<Func
<CallSite
,T0
,T1
,T2
,T3
,T4
,T5
,T6
,T7
,TRet
>>.Create(binder
));
310 private DynamicInstruction(CallSite
<Func
<CallSite
,T0
,T1
,T2
,T3
,T4
,T5
,T6
,T7
,TRet
>> site
) {
314 public override int ProducedStack { get { return 1; }
}
315 public override int ConsumedStack { get { return 8; }
}
317 public override int Run(InterpretedFrame frame
) {
318 frame
.Data
[frame
.StackIndex
- 8] = _site
.Target(_site
, (T0
)frame
.Data
[frame
.StackIndex
- 8], (T1
)frame
.Data
[frame
.StackIndex
- 7], (T2
)frame
.Data
[frame
.StackIndex
- 6], (T3
)frame
.Data
[frame
.StackIndex
- 5], (T4
)frame
.Data
[frame
.StackIndex
- 4], (T5
)frame
.Data
[frame
.StackIndex
- 3], (T6
)frame
.Data
[frame
.StackIndex
- 2], (T7
)frame
.Data
[frame
.StackIndex
- 1]);
319 frame
.StackIndex
-= 7;
323 public override string ToString() {
324 return "Dynamic(" + _site
.Binder
.ToString() + ")";
328 internal class DynamicInstruction
<T0
,T1
,T2
,T3
,T4
,T5
,T6
,T7
,T8
,TRet
> : Instruction
{
329 private CallSite
<Func
<CallSite
,T0
,T1
,T2
,T3
,T4
,T5
,T6
,T7
,T8
,TRet
>> _site
;
331 public static Instruction
Factory(CallSiteBinder binder
) {
332 return new DynamicInstruction
<T0
,T1
,T2
,T3
,T4
,T5
,T6
,T7
,T8
,TRet
>(CallSite
<Func
<CallSite
,T0
,T1
,T2
,T3
,T4
,T5
,T6
,T7
,T8
,TRet
>>.Create(binder
));
335 private DynamicInstruction(CallSite
<Func
<CallSite
,T0
,T1
,T2
,T3
,T4
,T5
,T6
,T7
,T8
,TRet
>> site
) {
339 public override int ProducedStack { get { return 1; }
}
340 public override int ConsumedStack { get { return 9; }
}
342 public override int Run(InterpretedFrame frame
) {
343 frame
.Data
[frame
.StackIndex
- 9] = _site
.Target(_site
, (T0
)frame
.Data
[frame
.StackIndex
- 9], (T1
)frame
.Data
[frame
.StackIndex
- 8], (T2
)frame
.Data
[frame
.StackIndex
- 7], (T3
)frame
.Data
[frame
.StackIndex
- 6], (T4
)frame
.Data
[frame
.StackIndex
- 5], (T5
)frame
.Data
[frame
.StackIndex
- 4], (T6
)frame
.Data
[frame
.StackIndex
- 3], (T7
)frame
.Data
[frame
.StackIndex
- 2], (T8
)frame
.Data
[frame
.StackIndex
- 1]);
344 frame
.StackIndex
-= 8;
348 public override string ToString() {
349 return "Dynamic(" + _site
.Binder
.ToString() + ")";
353 internal class DynamicInstruction
<T0
,T1
,T2
,T3
,T4
,T5
,T6
,T7
,T8
,T9
,TRet
> : Instruction
{
354 private CallSite
<Func
<CallSite
,T0
,T1
,T2
,T3
,T4
,T5
,T6
,T7
,T8
,T9
,TRet
>> _site
;
356 public static Instruction
Factory(CallSiteBinder binder
) {
357 return new DynamicInstruction
<T0
,T1
,T2
,T3
,T4
,T5
,T6
,T7
,T8
,T9
,TRet
>(CallSite
<Func
<CallSite
,T0
,T1
,T2
,T3
,T4
,T5
,T6
,T7
,T8
,T9
,TRet
>>.Create(binder
));
360 private DynamicInstruction(CallSite
<Func
<CallSite
,T0
,T1
,T2
,T3
,T4
,T5
,T6
,T7
,T8
,T9
,TRet
>> site
) {
364 public override int ProducedStack { get { return 1; }
}
365 public override int ConsumedStack { get { return 10; }
}
367 public override int Run(InterpretedFrame frame
) {
368 frame
.Data
[frame
.StackIndex
- 10] = _site
.Target(_site
, (T0
)frame
.Data
[frame
.StackIndex
- 10], (T1
)frame
.Data
[frame
.StackIndex
- 9], (T2
)frame
.Data
[frame
.StackIndex
- 8], (T3
)frame
.Data
[frame
.StackIndex
- 7], (T4
)frame
.Data
[frame
.StackIndex
- 6], (T5
)frame
.Data
[frame
.StackIndex
- 5], (T6
)frame
.Data
[frame
.StackIndex
- 4], (T7
)frame
.Data
[frame
.StackIndex
- 3], (T8
)frame
.Data
[frame
.StackIndex
- 2], (T9
)frame
.Data
[frame
.StackIndex
- 1]);
369 frame
.StackIndex
-= 9;
373 public override string ToString() {
374 return "Dynamic(" + _site
.Binder
.ToString() + ")";
378 internal class DynamicInstruction
<T0
,T1
,T2
,T3
,T4
,T5
,T6
,T7
,T8
,T9
,T10
,TRet
> : Instruction
{
379 private CallSite
<Func
<CallSite
,T0
,T1
,T2
,T3
,T4
,T5
,T6
,T7
,T8
,T9
,T10
,TRet
>> _site
;
381 public static Instruction
Factory(CallSiteBinder binder
) {
382 return new DynamicInstruction
<T0
,T1
,T2
,T3
,T4
,T5
,T6
,T7
,T8
,T9
,T10
,TRet
>(CallSite
<Func
<CallSite
,T0
,T1
,T2
,T3
,T4
,T5
,T6
,T7
,T8
,T9
,T10
,TRet
>>.Create(binder
));
385 private DynamicInstruction(CallSite
<Func
<CallSite
,T0
,T1
,T2
,T3
,T4
,T5
,T6
,T7
,T8
,T9
,T10
,TRet
>> site
) {
389 public override int ProducedStack { get { return 1; }
}
390 public override int ConsumedStack { get { return 11; }
}
392 public override int Run(InterpretedFrame frame
) {
393 frame
.Data
[frame
.StackIndex
- 11] = _site
.Target(_site
, (T0
)frame
.Data
[frame
.StackIndex
- 11], (T1
)frame
.Data
[frame
.StackIndex
- 10], (T2
)frame
.Data
[frame
.StackIndex
- 9], (T3
)frame
.Data
[frame
.StackIndex
- 8], (T4
)frame
.Data
[frame
.StackIndex
- 7], (T5
)frame
.Data
[frame
.StackIndex
- 6], (T6
)frame
.Data
[frame
.StackIndex
- 5], (T7
)frame
.Data
[frame
.StackIndex
- 4], (T8
)frame
.Data
[frame
.StackIndex
- 3], (T9
)frame
.Data
[frame
.StackIndex
- 2], (T10
)frame
.Data
[frame
.StackIndex
- 1]);
394 frame
.StackIndex
-= 10;
398 public override string ToString() {
399 return "Dynamic(" + _site
.Binder
.ToString() + ")";
403 internal class DynamicInstruction
<T0
,T1
,T2
,T3
,T4
,T5
,T6
,T7
,T8
,T9
,T10
,T11
,TRet
> : Instruction
{
404 private CallSite
<Func
<CallSite
,T0
,T1
,T2
,T3
,T4
,T5
,T6
,T7
,T8
,T9
,T10
,T11
,TRet
>> _site
;
406 public static Instruction
Factory(CallSiteBinder binder
) {
407 return new DynamicInstruction
<T0
,T1
,T2
,T3
,T4
,T5
,T6
,T7
,T8
,T9
,T10
,T11
,TRet
>(CallSite
<Func
<CallSite
,T0
,T1
,T2
,T3
,T4
,T5
,T6
,T7
,T8
,T9
,T10
,T11
,TRet
>>.Create(binder
));
410 private DynamicInstruction(CallSite
<Func
<CallSite
,T0
,T1
,T2
,T3
,T4
,T5
,T6
,T7
,T8
,T9
,T10
,T11
,TRet
>> site
) {
414 public override int ProducedStack { get { return 1; }
}
415 public override int ConsumedStack { get { return 12; }
}
417 public override int Run(InterpretedFrame frame
) {
418 frame
.Data
[frame
.StackIndex
- 12] = _site
.Target(_site
, (T0
)frame
.Data
[frame
.StackIndex
- 12], (T1
)frame
.Data
[frame
.StackIndex
- 11], (T2
)frame
.Data
[frame
.StackIndex
- 10], (T3
)frame
.Data
[frame
.StackIndex
- 9], (T4
)frame
.Data
[frame
.StackIndex
- 8], (T5
)frame
.Data
[frame
.StackIndex
- 7], (T6
)frame
.Data
[frame
.StackIndex
- 6], (T7
)frame
.Data
[frame
.StackIndex
- 5], (T8
)frame
.Data
[frame
.StackIndex
- 4], (T9
)frame
.Data
[frame
.StackIndex
- 3], (T10
)frame
.Data
[frame
.StackIndex
- 2], (T11
)frame
.Data
[frame
.StackIndex
- 1]);
419 frame
.StackIndex
-= 11;
423 public override string ToString() {
424 return "Dynamic(" + _site
.Binder
.ToString() + ")";
428 internal class DynamicInstruction
<T0
,T1
,T2
,T3
,T4
,T5
,T6
,T7
,T8
,T9
,T10
,T11
,T12
,TRet
> : Instruction
{
429 private CallSite
<Func
<CallSite
,T0
,T1
,T2
,T3
,T4
,T5
,T6
,T7
,T8
,T9
,T10
,T11
,T12
,TRet
>> _site
;
431 public static Instruction
Factory(CallSiteBinder binder
) {
432 return new DynamicInstruction
<T0
,T1
,T2
,T3
,T4
,T5
,T6
,T7
,T8
,T9
,T10
,T11
,T12
,TRet
>(CallSite
<Func
<CallSite
,T0
,T1
,T2
,T3
,T4
,T5
,T6
,T7
,T8
,T9
,T10
,T11
,T12
,TRet
>>.Create(binder
));
435 private DynamicInstruction(CallSite
<Func
<CallSite
,T0
,T1
,T2
,T3
,T4
,T5
,T6
,T7
,T8
,T9
,T10
,T11
,T12
,TRet
>> site
) {
439 public override int ProducedStack { get { return 1; }
}
440 public override int ConsumedStack { get { return 13; }
}
442 public override int Run(InterpretedFrame frame
) {
443 frame
.Data
[frame
.StackIndex
- 13] = _site
.Target(_site
, (T0
)frame
.Data
[frame
.StackIndex
- 13], (T1
)frame
.Data
[frame
.StackIndex
- 12], (T2
)frame
.Data
[frame
.StackIndex
- 11], (T3
)frame
.Data
[frame
.StackIndex
- 10], (T4
)frame
.Data
[frame
.StackIndex
- 9], (T5
)frame
.Data
[frame
.StackIndex
- 8], (T6
)frame
.Data
[frame
.StackIndex
- 7], (T7
)frame
.Data
[frame
.StackIndex
- 6], (T8
)frame
.Data
[frame
.StackIndex
- 5], (T9
)frame
.Data
[frame
.StackIndex
- 4], (T10
)frame
.Data
[frame
.StackIndex
- 3], (T11
)frame
.Data
[frame
.StackIndex
- 2], (T12
)frame
.Data
[frame
.StackIndex
- 1]);
444 frame
.StackIndex
-= 12;
448 public override string ToString() {
449 return "Dynamic(" + _site
.Binder
.ToString() + ")";
453 internal class DynamicInstruction
<T0
,T1
,T2
,T3
,T4
,T5
,T6
,T7
,T8
,T9
,T10
,T11
,T12
,T13
,TRet
> : Instruction
{
454 private CallSite
<Func
<CallSite
,T0
,T1
,T2
,T3
,T4
,T5
,T6
,T7
,T8
,T9
,T10
,T11
,T12
,T13
,TRet
>> _site
;
456 public static Instruction
Factory(CallSiteBinder binder
) {
457 return new DynamicInstruction
<T0
,T1
,T2
,T3
,T4
,T5
,T6
,T7
,T8
,T9
,T10
,T11
,T12
,T13
,TRet
>(CallSite
<Func
<CallSite
,T0
,T1
,T2
,T3
,T4
,T5
,T6
,T7
,T8
,T9
,T10
,T11
,T12
,T13
,TRet
>>.Create(binder
));
460 private DynamicInstruction(CallSite
<Func
<CallSite
,T0
,T1
,T2
,T3
,T4
,T5
,T6
,T7
,T8
,T9
,T10
,T11
,T12
,T13
,TRet
>> site
) {
464 public override int ProducedStack { get { return 1; }
}
465 public override int ConsumedStack { get { return 14; }
}
467 public override int Run(InterpretedFrame frame
) {
468 frame
.Data
[frame
.StackIndex
- 14] = _site
.Target(_site
, (T0
)frame
.Data
[frame
.StackIndex
- 14], (T1
)frame
.Data
[frame
.StackIndex
- 13], (T2
)frame
.Data
[frame
.StackIndex
- 12], (T3
)frame
.Data
[frame
.StackIndex
- 11], (T4
)frame
.Data
[frame
.StackIndex
- 10], (T5
)frame
.Data
[frame
.StackIndex
- 9], (T6
)frame
.Data
[frame
.StackIndex
- 8], (T7
)frame
.Data
[frame
.StackIndex
- 7], (T8
)frame
.Data
[frame
.StackIndex
- 6], (T9
)frame
.Data
[frame
.StackIndex
- 5], (T10
)frame
.Data
[frame
.StackIndex
- 4], (T11
)frame
.Data
[frame
.StackIndex
- 3], (T12
)frame
.Data
[frame
.StackIndex
- 2], (T13
)frame
.Data
[frame
.StackIndex
- 1]);
469 frame
.StackIndex
-= 13;
473 public override string ToString() {
474 return "Dynamic(" + _site
.Binder
.ToString() + ")";
478 internal class DynamicInstruction
<T0
,T1
,T2
,T3
,T4
,T5
,T6
,T7
,T8
,T9
,T10
,T11
,T12
,T13
,T14
,TRet
> : Instruction
{
479 private CallSite
<Func
<CallSite
,T0
,T1
,T2
,T3
,T4
,T5
,T6
,T7
,T8
,T9
,T10
,T11
,T12
,T13
,T14
,TRet
>> _site
;
481 public static Instruction
Factory(CallSiteBinder binder
) {
482 return new DynamicInstruction
<T0
,T1
,T2
,T3
,T4
,T5
,T6
,T7
,T8
,T9
,T10
,T11
,T12
,T13
,T14
,TRet
>(CallSite
<Func
<CallSite
,T0
,T1
,T2
,T3
,T4
,T5
,T6
,T7
,T8
,T9
,T10
,T11
,T12
,T13
,T14
,TRet
>>.Create(binder
));
485 private DynamicInstruction(CallSite
<Func
<CallSite
,T0
,T1
,T2
,T3
,T4
,T5
,T6
,T7
,T8
,T9
,T10
,T11
,T12
,T13
,T14
,TRet
>> site
) {
489 public override int ProducedStack { get { return 1; }
}
490 public override int ConsumedStack { get { return 15; }
}
492 public override int Run(InterpretedFrame frame
) {
493 frame
.Data
[frame
.StackIndex
- 15] = _site
.Target(_site
, (T0
)frame
.Data
[frame
.StackIndex
- 15], (T1
)frame
.Data
[frame
.StackIndex
- 14], (T2
)frame
.Data
[frame
.StackIndex
- 13], (T3
)frame
.Data
[frame
.StackIndex
- 12], (T4
)frame
.Data
[frame
.StackIndex
- 11], (T5
)frame
.Data
[frame
.StackIndex
- 10], (T6
)frame
.Data
[frame
.StackIndex
- 9], (T7
)frame
.Data
[frame
.StackIndex
- 8], (T8
)frame
.Data
[frame
.StackIndex
- 7], (T9
)frame
.Data
[frame
.StackIndex
- 6], (T10
)frame
.Data
[frame
.StackIndex
- 5], (T11
)frame
.Data
[frame
.StackIndex
- 4], (T12
)frame
.Data
[frame
.StackIndex
- 3], (T13
)frame
.Data
[frame
.StackIndex
- 2], (T14
)frame
.Data
[frame
.StackIndex
- 1]);
494 frame
.StackIndex
-= 14;
498 public override string ToString() {
499 return "Dynamic(" + _site
.Binder
.ToString() + ")";
504 // *** END GENERATED CODE ***