PageRenderTime 88ms CodeModel.GetById 28ms RepoModel.GetById 1ms app.codeStats 0ms

/src/System.Management.Automation/engine/interpreter/CallInstruction.Generated.cs

https://gitlab.com/unofficial-mirrors/PowerShell
C# | 902 lines | 730 code | 139 blank | 33 comment | 121 complexity | c42e12bf58d711a4cb469e9f8da24537 MD5 | raw file
  1. /* ****************************************************************************
  2. *
  3. * Copyright (c) Microsoft Corporation.
  4. *
  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. * ironpy@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.
  10. *
  11. * You must not remove this notice, or any other, from this software.
  12. *
  13. *
  14. * ***************************************************************************/
  15. #if !CLR2
  16. using System.Linq.Expressions;
  17. #else
  18. using Microsoft.Scripting.Ast;
  19. #endif
  20. using System;
  21. using System.Collections.Generic;
  22. using System.Diagnostics;
  23. using System.Reflection;
  24. using System.Threading;
  25. using System.Dynamic;
  26. namespace System.Management.Automation.Interpreter {
  27. #region Generated Reflected Caller
  28. // *** BEGIN GENERATED CODE ***
  29. // generated by function: gen_all from: generate_reflected_calls.py
  30. internal partial class CallInstruction {
  31. private const int MaxHelpers = 10;
  32. private const int MaxArgs = 3;
  33. public virtual object InvokeInstance(object instance, params object[] args) {
  34. switch(args.Length) {
  35. case 0: return Invoke(instance);
  36. case 1: return Invoke(instance, args[0]);
  37. case 2: return Invoke(instance, args[0], args[1]);
  38. case 3: return Invoke(instance, args[0], args[1], args[2]);
  39. case 4: return Invoke(instance, args[0], args[1], args[2], args[3]);
  40. case 5: return Invoke(instance, args[0], args[1], args[2], args[3], args[4]);
  41. case 6: return Invoke(instance, args[0], args[1], args[2], args[3], args[4], args[5]);
  42. case 7: return Invoke(instance, args[0], args[1], args[2], args[3], args[4], args[5], args[6]);
  43. case 8: return Invoke(instance, args[0], args[1], args[2], args[3], args[4], args[5], args[6], args[7]);
  44. default: throw new InvalidOperationException();
  45. }
  46. }
  47. public virtual object Invoke(params object[] args) {
  48. switch(args.Length) {
  49. case 0: return Invoke();
  50. case 1: return Invoke(args[0]);
  51. case 2: return Invoke(args[0], args[1]);
  52. case 3: return Invoke(args[0], args[1], args[2]);
  53. case 4: return Invoke(args[0], args[1], args[2], args[3]);
  54. case 5: return Invoke(args[0], args[1], args[2], args[3], args[4]);
  55. case 6: return Invoke(args[0], args[1], args[2], args[3], args[4], args[5]);
  56. case 7: return Invoke(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);
  57. case 8: return Invoke(args[0], args[1], args[2], args[3], args[4], args[5], args[6], args[7]);
  58. case 9: return Invoke(args[0], args[1], args[2], args[3], args[4], args[5], args[6], args[7], args[8]);
  59. default: throw new InvalidOperationException();
  60. }
  61. }
  62. public virtual object Invoke() { throw new InvalidOperationException(); }
  63. public virtual object Invoke(object arg0) { throw new InvalidOperationException(); }
  64. public virtual object Invoke(object arg0, object arg1) { throw new InvalidOperationException(); }
  65. public virtual object Invoke(object arg0, object arg1, object arg2) { throw new InvalidOperationException(); }
  66. public virtual object Invoke(object arg0, object arg1, object arg2, object arg3) { throw new InvalidOperationException(); }
  67. public virtual object Invoke(object arg0, object arg1, object arg2, object arg3, object arg4) { throw new InvalidOperationException(); }
  68. public virtual object Invoke(object arg0, object arg1, object arg2, object arg3, object arg4, object arg5) { throw new InvalidOperationException(); }
  69. public virtual object Invoke(object arg0, object arg1, object arg2, object arg3, object arg4, object arg5, object arg6) { throw new InvalidOperationException(); }
  70. public virtual object Invoke(object arg0, object arg1, object arg2, object arg3, object arg4, object arg5, object arg6, object arg7) { throw new InvalidOperationException(); }
  71. public virtual object Invoke(object arg0, object arg1, object arg2, object arg3, object arg4, object arg5, object arg6, object arg7, object arg8) { throw new InvalidOperationException(); }
  72. /// <summary>
  73. /// Fast creation works if we have a known primitive types for the entire
  74. /// method signature. If we have any non-primitive types then FastCreate
  75. /// falls back to SlowCreate which works for all types.
  76. ///
  77. /// Fast creation is fast because it avoids using reflection (MakeGenericType
  78. /// and Activator.CreateInstance) to create the types. It does this through
  79. /// calling a series of generic methods picking up each strong type of the
  80. /// signature along the way. When it runs out of types it news up the
  81. /// appropriate CallInstruction with the strong-types that have been built up.
  82. ///
  83. /// One relaxation is that for return types which are non-primitive types
  84. /// we can fallback to object due to relaxed delegates.
  85. /// </summary>
  86. private static CallInstruction FastCreate(MethodInfo target, ParameterInfo[] pi) {
  87. Type t = TryGetParameterOrReturnType(target, pi, 0);
  88. if (t == null) {
  89. return new ActionCallInstruction(target);
  90. }
  91. if (t.IsEnum) return SlowCreate(target, pi);
  92. switch (t.GetTypeCode()) {
  93. case TypeCode.Object: {
  94. if (t != typeof(object) && (IndexIsNotReturnType(0, target, pi) || t.IsValueType)) {
  95. // if we're on the return type relaxed delegates makes it ok to use object
  96. goto default;
  97. }
  98. return FastCreate<Object>(target, pi);
  99. }
  100. case TypeCode.Int16: return FastCreate<Int16>(target, pi);
  101. case TypeCode.Int32: return FastCreate<Int32>(target, pi);
  102. case TypeCode.Int64: return FastCreate<Int64>(target, pi);
  103. case TypeCode.Boolean: return FastCreate<Boolean>(target, pi);
  104. case TypeCode.Char: return FastCreate<Char>(target, pi);
  105. case TypeCode.Byte: return FastCreate<Byte>(target, pi);
  106. case TypeCode.Decimal: return FastCreate<Decimal>(target, pi);
  107. case TypeCode.DateTime: return FastCreate<DateTime>(target, pi);
  108. case TypeCode.Double: return FastCreate<Double>(target, pi);
  109. case TypeCode.Single: return FastCreate<Single>(target, pi);
  110. case TypeCode.UInt16: return FastCreate<UInt16>(target, pi);
  111. case TypeCode.UInt32: return FastCreate<UInt32>(target, pi);
  112. case TypeCode.UInt64: return FastCreate<UInt64>(target, pi);
  113. case TypeCode.String: return FastCreate<String>(target, pi);
  114. case TypeCode.SByte: return FastCreate<SByte>(target, pi);
  115. default: return SlowCreate(target, pi);
  116. }
  117. }
  118. private static CallInstruction FastCreate<T0>(MethodInfo target, ParameterInfo[] pi) {
  119. Type t = TryGetParameterOrReturnType(target, pi, 1);
  120. if (t == null) {
  121. if (target.ReturnType == typeof(void)) {
  122. return new ActionCallInstruction<T0>(target);
  123. }
  124. return new FuncCallInstruction<T0>(target);
  125. }
  126. if (t.IsEnum) return SlowCreate(target, pi);
  127. switch (t.GetTypeCode()) {
  128. case TypeCode.Object: {
  129. if (t != typeof(object) && (IndexIsNotReturnType(1, target, pi) || t.IsValueType)) {
  130. // if we're on the return type relaxed delegates makes it ok to use object
  131. goto default;
  132. }
  133. return FastCreate<T0, Object>(target, pi);
  134. }
  135. case TypeCode.Int16: return FastCreate<T0, Int16>(target, pi);
  136. case TypeCode.Int32: return FastCreate<T0, Int32>(target, pi);
  137. case TypeCode.Int64: return FastCreate<T0, Int64>(target, pi);
  138. case TypeCode.Boolean: return FastCreate<T0, Boolean>(target, pi);
  139. case TypeCode.Char: return FastCreate<T0, Char>(target, pi);
  140. case TypeCode.Byte: return FastCreate<T0, Byte>(target, pi);
  141. case TypeCode.Decimal: return FastCreate<T0, Decimal>(target, pi);
  142. case TypeCode.DateTime: return FastCreate<T0, DateTime>(target, pi);
  143. case TypeCode.Double: return FastCreate<T0, Double>(target, pi);
  144. case TypeCode.Single: return FastCreate<T0, Single>(target, pi);
  145. case TypeCode.UInt16: return FastCreate<T0, UInt16>(target, pi);
  146. case TypeCode.UInt32: return FastCreate<T0, UInt32>(target, pi);
  147. case TypeCode.UInt64: return FastCreate<T0, UInt64>(target, pi);
  148. case TypeCode.String: return FastCreate<T0, String>(target, pi);
  149. case TypeCode.SByte: return FastCreate<T0, SByte>(target, pi);
  150. default: return SlowCreate(target, pi);
  151. }
  152. }
  153. private static CallInstruction FastCreate<T0, T1>(MethodInfo target, ParameterInfo[] pi) {
  154. Type t = TryGetParameterOrReturnType(target, pi, 2);
  155. if (t == null) {
  156. if (target.ReturnType == typeof(void)) {
  157. return new ActionCallInstruction<T0, T1>(target);
  158. }
  159. return new FuncCallInstruction<T0, T1>(target);
  160. }
  161. if (t.IsEnum) return SlowCreate(target, pi);
  162. switch (t.GetTypeCode()) {
  163. case TypeCode.Object: {
  164. Debug.Assert(pi.Length == 2);
  165. if (t.IsValueType) goto default;
  166. return new FuncCallInstruction<T0, T1, Object>(target);
  167. }
  168. case TypeCode.Int16: return new FuncCallInstruction<T0, T1, Int16>(target);
  169. case TypeCode.Int32: return new FuncCallInstruction<T0, T1, Int32>(target);
  170. case TypeCode.Int64: return new FuncCallInstruction<T0, T1, Int64>(target);
  171. case TypeCode.Boolean: return new FuncCallInstruction<T0, T1, Boolean>(target);
  172. case TypeCode.Char: return new FuncCallInstruction<T0, T1, Char>(target);
  173. case TypeCode.Byte: return new FuncCallInstruction<T0, T1, Byte>(target);
  174. case TypeCode.Decimal: return new FuncCallInstruction<T0, T1, Decimal>(target);
  175. case TypeCode.DateTime: return new FuncCallInstruction<T0, T1, DateTime>(target);
  176. case TypeCode.Double: return new FuncCallInstruction<T0, T1, Double>(target);
  177. case TypeCode.Single: return new FuncCallInstruction<T0, T1, Single>(target);
  178. case TypeCode.UInt16: return new FuncCallInstruction<T0, T1, UInt16>(target);
  179. case TypeCode.UInt32: return new FuncCallInstruction<T0, T1, UInt32>(target);
  180. case TypeCode.UInt64: return new FuncCallInstruction<T0, T1, UInt64>(target);
  181. case TypeCode.String: return new FuncCallInstruction<T0, T1, String>(target);
  182. case TypeCode.SByte: return new FuncCallInstruction<T0, T1, SByte>(target);
  183. default: return SlowCreate(target, pi);
  184. }
  185. }
  186. private static Type GetHelperType(MethodInfo info, Type[] arrTypes) {
  187. Type t;
  188. if (info.ReturnType == typeof(void)) {
  189. switch (arrTypes.Length) {
  190. case 0: t = typeof(ActionCallInstruction); break;
  191. case 1: t = typeof(ActionCallInstruction<>).MakeGenericType(arrTypes); break;
  192. case 2: t = typeof(ActionCallInstruction<,>).MakeGenericType(arrTypes); break;
  193. case 3: t = typeof(ActionCallInstruction<,,>).MakeGenericType(arrTypes); break;
  194. case 4: t = typeof(ActionCallInstruction<,,,>).MakeGenericType(arrTypes); break;
  195. case 5: t = typeof(ActionCallInstruction<,,,,>).MakeGenericType(arrTypes); break;
  196. case 6: t = typeof(ActionCallInstruction<,,,,,>).MakeGenericType(arrTypes); break;
  197. case 7: t = typeof(ActionCallInstruction<,,,,,,>).MakeGenericType(arrTypes); break;
  198. case 8: t = typeof(ActionCallInstruction<,,,,,,,>).MakeGenericType(arrTypes); break;
  199. case 9: t = typeof(ActionCallInstruction<,,,,,,,,>).MakeGenericType(arrTypes); break;
  200. default: throw new InvalidOperationException();
  201. }
  202. } else {
  203. switch (arrTypes.Length) {
  204. case 1: t = typeof(FuncCallInstruction<>).MakeGenericType(arrTypes); break;
  205. case 2: t = typeof(FuncCallInstruction<,>).MakeGenericType(arrTypes); break;
  206. case 3: t = typeof(FuncCallInstruction<,,>).MakeGenericType(arrTypes); break;
  207. case 4: t = typeof(FuncCallInstruction<,,,>).MakeGenericType(arrTypes); break;
  208. case 5: t = typeof(FuncCallInstruction<,,,,>).MakeGenericType(arrTypes); break;
  209. case 6: t = typeof(FuncCallInstruction<,,,,,>).MakeGenericType(arrTypes); break;
  210. case 7: t = typeof(FuncCallInstruction<,,,,,,>).MakeGenericType(arrTypes); break;
  211. case 8: t = typeof(FuncCallInstruction<,,,,,,,>).MakeGenericType(arrTypes); break;
  212. case 9: t = typeof(FuncCallInstruction<,,,,,,,,>).MakeGenericType(arrTypes); break;
  213. case 10: t = typeof(FuncCallInstruction<,,,,,,,,,>).MakeGenericType(arrTypes); break;
  214. default: throw new InvalidOperationException();
  215. }
  216. }
  217. return t;
  218. }
  219. public static MethodInfo CacheFunc<TRet>(Func<TRet> method) {
  220. var info = method.GetMethodInfo();
  221. lock (s_cache) {
  222. s_cache[info] = new FuncCallInstruction<TRet>(method);
  223. }
  224. return info;
  225. }
  226. public static MethodInfo CacheFunc<T0, TRet>(Func<T0, TRet> method) {
  227. var info = method.GetMethodInfo();
  228. lock (s_cache) {
  229. s_cache[info] = new FuncCallInstruction<T0, TRet>(method);
  230. }
  231. return info;
  232. }
  233. public static MethodInfo CacheFunc<T0, T1, TRet>(Func<T0, T1, TRet> method) {
  234. var info = method.GetMethodInfo();
  235. lock (s_cache) {
  236. s_cache[info] = new FuncCallInstruction<T0, T1, TRet>(method);
  237. }
  238. return info;
  239. }
  240. public static MethodInfo CacheFunc<T0, T1, T2, TRet>(Func<T0, T1, T2, TRet> method) {
  241. var info = method.GetMethodInfo();
  242. lock (s_cache) {
  243. s_cache[info] = new FuncCallInstruction<T0, T1, T2, TRet>(method);
  244. }
  245. return info;
  246. }
  247. public static MethodInfo CacheFunc<T0, T1, T2, T3, TRet>(Func<T0, T1, T2, T3, TRet> method) {
  248. var info = method.GetMethodInfo();
  249. lock (s_cache) {
  250. s_cache[info] = new FuncCallInstruction<T0, T1, T2, T3, TRet>(method);
  251. }
  252. return info;
  253. }
  254. public static MethodInfo CacheFunc<T0, T1, T2, T3, T4, TRet>(Func<T0, T1, T2, T3, T4, TRet> method) {
  255. var info = method.GetMethodInfo();
  256. lock (s_cache) {
  257. s_cache[info] = new FuncCallInstruction<T0, T1, T2, T3, T4, TRet>(method);
  258. }
  259. return info;
  260. }
  261. public static MethodInfo CacheFunc<T0, T1, T2, T3, T4, T5, TRet>(Func<T0, T1, T2, T3, T4, T5, TRet> method) {
  262. var info = method.GetMethodInfo();
  263. lock (s_cache) {
  264. s_cache[info] = new FuncCallInstruction<T0, T1, T2, T3, T4, T5, TRet>(method);
  265. }
  266. return info;
  267. }
  268. public static MethodInfo CacheFunc<T0, T1, T2, T3, T4, T5, T6, TRet>(Func<T0, T1, T2, T3, T4, T5, T6, TRet> method) {
  269. var info = method.GetMethodInfo();
  270. lock (s_cache) {
  271. s_cache[info] = new FuncCallInstruction<T0, T1, T2, T3, T4, T5, T6, TRet>(method);
  272. }
  273. return info;
  274. }
  275. public static MethodInfo CacheFunc<T0, T1, T2, T3, T4, T5, T6, T7, TRet>(Func<T0, T1, T2, T3, T4, T5, T6, T7, TRet> method) {
  276. var info = method.GetMethodInfo();
  277. lock (s_cache) {
  278. s_cache[info] = new FuncCallInstruction<T0, T1, T2, T3, T4, T5, T6, T7, TRet>(method);
  279. }
  280. return info;
  281. }
  282. public static MethodInfo CacheFunc<T0, T1, T2, T3, T4, T5, T6, T7, T8, TRet>(Func<T0, T1, T2, T3, T4, T5, T6, T7, T8, TRet> method) {
  283. var info = method.GetMethodInfo();
  284. lock (s_cache) {
  285. s_cache[info] = new FuncCallInstruction<T0, T1, T2, T3, T4, T5, T6, T7, T8, TRet>(method);
  286. }
  287. return info;
  288. }
  289. public static MethodInfo CacheAction(Action method) {
  290. var info = method.GetMethodInfo();
  291. lock (s_cache) {
  292. s_cache[info] = new ActionCallInstruction(method);
  293. }
  294. return info;
  295. }
  296. public static MethodInfo CacheAction<T0>(Action<T0> method) {
  297. var info = method.GetMethodInfo();
  298. lock (s_cache) {
  299. s_cache[info] = new ActionCallInstruction<T0>(method);
  300. }
  301. return info;
  302. }
  303. public static MethodInfo CacheAction<T0, T1>(Action<T0, T1> method) {
  304. var info = method.GetMethodInfo();
  305. lock (s_cache) {
  306. s_cache[info] = new ActionCallInstruction<T0, T1>(method);
  307. }
  308. return info;
  309. }
  310. public static MethodInfo CacheAction<T0, T1, T2>(Action<T0, T1, T2> method) {
  311. var info = method.GetMethodInfo();
  312. lock (s_cache) {
  313. s_cache[info] = new ActionCallInstruction<T0, T1, T2>(method);
  314. }
  315. return info;
  316. }
  317. public static MethodInfo CacheAction<T0, T1, T2, T3>(Action<T0, T1, T2, T3> method) {
  318. var info = method.GetMethodInfo();
  319. lock (s_cache) {
  320. s_cache[info] = new ActionCallInstruction<T0, T1, T2, T3>(method);
  321. }
  322. return info;
  323. }
  324. public static MethodInfo CacheAction<T0, T1, T2, T3, T4>(Action<T0, T1, T2, T3, T4> method) {
  325. var info = method.GetMethodInfo();
  326. lock (s_cache) {
  327. s_cache[info] = new ActionCallInstruction<T0, T1, T2, T3, T4>(method);
  328. }
  329. return info;
  330. }
  331. public static MethodInfo CacheAction<T0, T1, T2, T3, T4, T5>(Action<T0, T1, T2, T3, T4, T5> method) {
  332. var info = method.GetMethodInfo();
  333. lock (s_cache) {
  334. s_cache[info] = new ActionCallInstruction<T0, T1, T2, T3, T4, T5>(method);
  335. }
  336. return info;
  337. }
  338. public static MethodInfo CacheAction<T0, T1, T2, T3, T4, T5, T6>(Action<T0, T1, T2, T3, T4, T5, T6> method) {
  339. var info = method.GetMethodInfo();
  340. lock (s_cache) {
  341. s_cache[info] = new ActionCallInstruction<T0, T1, T2, T3, T4, T5, T6>(method);
  342. }
  343. return info;
  344. }
  345. public static MethodInfo CacheAction<T0, T1, T2, T3, T4, T5, T6, T7>(Action<T0, T1, T2, T3, T4, T5, T6, T7> method) {
  346. var info = method.GetMethodInfo();
  347. lock (s_cache) {
  348. s_cache[info] = new ActionCallInstruction<T0, T1, T2, T3, T4, T5, T6, T7>(method);
  349. }
  350. return info;
  351. }
  352. public static MethodInfo CacheAction<T0, T1, T2, T3, T4, T5, T6, T7, T8>(Action<T0, T1, T2, T3, T4, T5, T6, T7, T8> method) {
  353. var info = method.GetMethodInfo();
  354. lock (s_cache) {
  355. s_cache[info] = new ActionCallInstruction<T0, T1, T2, T3, T4, T5, T6, T7, T8>(method);
  356. }
  357. return info;
  358. }
  359. }
  360. internal sealed class ActionCallInstruction : CallInstruction {
  361. private readonly Action _target;
  362. public override MethodInfo Info { get { return _target.GetMethodInfo(); } }
  363. public override int ArgumentCount { get { return 0; } }
  364. public ActionCallInstruction(Action target) {
  365. _target = target;
  366. }
  367. public ActionCallInstruction(MethodInfo target) {
  368. _target = (Action)target.CreateDelegate(typeof(Action));
  369. }
  370. public override object Invoke() {
  371. _target();
  372. return null;
  373. }
  374. public override int Run(InterpretedFrame frame) {
  375. _target();
  376. frame.StackIndex -= 0;
  377. return 1;
  378. }
  379. }
  380. internal sealed class ActionCallInstruction<T0> : CallInstruction {
  381. private readonly Action<T0> _target;
  382. public override MethodInfo Info { get { return _target.GetMethodInfo(); } }
  383. public override int ArgumentCount { get { return 1; } }
  384. public ActionCallInstruction(Action<T0> target) {
  385. _target = target;
  386. }
  387. public ActionCallInstruction(MethodInfo target) {
  388. _target = (Action<T0>)target.CreateDelegate(typeof(Action<T0>));
  389. }
  390. public override object Invoke(object arg0) {
  391. _target(arg0 != null ? (T0)arg0 : default(T0));
  392. return null;
  393. }
  394. public override int Run(InterpretedFrame frame) {
  395. _target((T0)frame.Data[frame.StackIndex - 1]);
  396. frame.StackIndex -= 1;
  397. return 1;
  398. }
  399. }
  400. internal sealed class ActionCallInstruction<T0, T1> : CallInstruction {
  401. private readonly Action<T0, T1> _target;
  402. public override MethodInfo Info { get { return _target.GetMethodInfo(); } }
  403. public override int ArgumentCount { get { return 2; } }
  404. public ActionCallInstruction(Action<T0, T1> target) {
  405. _target = target;
  406. }
  407. public ActionCallInstruction(MethodInfo target) {
  408. _target = (Action<T0, T1>)target.CreateDelegate(typeof(Action<T0, T1>));
  409. }
  410. public override object Invoke(object arg0, object arg1) {
  411. _target(arg0 != null ? (T0)arg0 : default(T0), arg1 != null ? (T1)arg1 : default(T1));
  412. return null;
  413. }
  414. public override int Run(InterpretedFrame frame) {
  415. _target((T0)frame.Data[frame.StackIndex - 2], (T1)frame.Data[frame.StackIndex - 1]);
  416. frame.StackIndex -= 2;
  417. return 1;
  418. }
  419. }
  420. internal sealed class ActionCallInstruction<T0, T1, T2> : CallInstruction {
  421. private readonly Action<T0, T1, T2> _target;
  422. public override MethodInfo Info { get { return _target.GetMethodInfo(); } }
  423. public override int ArgumentCount { get { return 3; } }
  424. public ActionCallInstruction(Action<T0, T1, T2> target) {
  425. _target = target;
  426. }
  427. public ActionCallInstruction(MethodInfo target) {
  428. _target = (Action<T0, T1, T2>)target.CreateDelegate(typeof(Action<T0, T1, T2>));
  429. }
  430. public override object Invoke(object arg0, object arg1, object arg2) {
  431. _target(arg0 != null ? (T0)arg0 : default(T0), arg1 != null ? (T1)arg1 : default(T1), arg2 != null ? (T2)arg2 : default(T2));
  432. return null;
  433. }
  434. public override int Run(InterpretedFrame frame) {
  435. _target((T0)frame.Data[frame.StackIndex - 3], (T1)frame.Data[frame.StackIndex - 2], (T2)frame.Data[frame.StackIndex - 1]);
  436. frame.StackIndex -= 3;
  437. return 1;
  438. }
  439. }
  440. internal sealed class ActionCallInstruction<T0, T1, T2, T3> : CallInstruction {
  441. private readonly Action<T0, T1, T2, T3> _target;
  442. public override MethodInfo Info { get { return _target.GetMethodInfo(); } }
  443. public override int ArgumentCount { get { return 4; } }
  444. public ActionCallInstruction(Action<T0, T1, T2, T3> target) {
  445. _target = target;
  446. }
  447. public ActionCallInstruction(MethodInfo target) {
  448. _target = (Action<T0, T1, T2, T3>)target.CreateDelegate(typeof(Action<T0, T1, T2, T3>));
  449. }
  450. public override object Invoke(object arg0, object arg1, object arg2, object arg3) {
  451. _target(arg0 != null ? (T0)arg0 : default(T0), arg1 != null ? (T1)arg1 : default(T1), arg2 != null ? (T2)arg2 : default(T2), arg3 != null ? (T3)arg3 : default(T3));
  452. return null;
  453. }
  454. public override int Run(InterpretedFrame frame) {
  455. _target((T0)frame.Data[frame.StackIndex - 4], (T1)frame.Data[frame.StackIndex - 3], (T2)frame.Data[frame.StackIndex - 2], (T3)frame.Data[frame.StackIndex - 1]);
  456. frame.StackIndex -= 4;
  457. return 1;
  458. }
  459. }
  460. internal sealed class ActionCallInstruction<T0, T1, T2, T3, T4> : CallInstruction {
  461. private readonly Action<T0, T1, T2, T3, T4> _target;
  462. public override MethodInfo Info { get { return _target.GetMethodInfo(); } }
  463. public override int ArgumentCount { get { return 5; } }
  464. public ActionCallInstruction(Action<T0, T1, T2, T3, T4> target) {
  465. _target = target;
  466. }
  467. public ActionCallInstruction(MethodInfo target) {
  468. _target = (Action<T0, T1, T2, T3, T4>)target.CreateDelegate(typeof(Action<T0, T1, T2, T3, T4>));
  469. }
  470. public override object Invoke(object arg0, object arg1, object arg2, object arg3, object arg4) {
  471. _target(arg0 != null ? (T0)arg0 : default(T0), arg1 != null ? (T1)arg1 : default(T1), arg2 != null ? (T2)arg2 : default(T2), arg3 != null ? (T3)arg3 : default(T3), arg4 != null ? (T4)arg4 : default(T4));
  472. return null;
  473. }
  474. public override int Run(InterpretedFrame frame) {
  475. _target((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]);
  476. frame.StackIndex -= 5;
  477. return 1;
  478. }
  479. }
  480. internal sealed class ActionCallInstruction<T0, T1, T2, T3, T4, T5> : CallInstruction {
  481. private readonly Action<T0, T1, T2, T3, T4, T5> _target;
  482. public override MethodInfo Info { get { return _target.GetMethodInfo(); } }
  483. public override int ArgumentCount { get { return 6; } }
  484. public ActionCallInstruction(Action<T0, T1, T2, T3, T4, T5> target) {
  485. _target = target;
  486. }
  487. public ActionCallInstruction(MethodInfo target) {
  488. _target = (Action<T0, T1, T2, T3, T4, T5>)target.CreateDelegate(typeof(Action<T0, T1, T2, T3, T4, T5>));
  489. }
  490. public override object Invoke(object arg0, object arg1, object arg2, object arg3, object arg4, object arg5) {
  491. _target(arg0 != null ? (T0)arg0 : default(T0), arg1 != null ? (T1)arg1 : default(T1), arg2 != null ? (T2)arg2 : default(T2), arg3 != null ? (T3)arg3 : default(T3), arg4 != null ? (T4)arg4 : default(T4), arg5 != null ? (T5)arg5 : default(T5));
  492. return null;
  493. }
  494. public override int Run(InterpretedFrame frame) {
  495. _target((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]);
  496. frame.StackIndex -= 6;
  497. return 1;
  498. }
  499. }
  500. internal sealed class ActionCallInstruction<T0, T1, T2, T3, T4, T5, T6> : CallInstruction {
  501. private readonly Action<T0, T1, T2, T3, T4, T5, T6> _target;
  502. public override MethodInfo Info { get { return _target.GetMethodInfo(); } }
  503. public override int ArgumentCount { get { return 7; } }
  504. public ActionCallInstruction(Action<T0, T1, T2, T3, T4, T5, T6> target) {
  505. _target = target;
  506. }
  507. public ActionCallInstruction(MethodInfo target) {
  508. _target = (Action<T0, T1, T2, T3, T4, T5, T6>)target.CreateDelegate(typeof(Action<T0, T1, T2, T3, T4, T5, T6>));
  509. }
  510. public override object Invoke(object arg0, object arg1, object arg2, object arg3, object arg4, object arg5, object arg6) {
  511. _target(arg0 != null ? (T0)arg0 : default(T0), arg1 != null ? (T1)arg1 : default(T1), arg2 != null ? (T2)arg2 : default(T2), arg3 != null ? (T3)arg3 : default(T3), arg4 != null ? (T4)arg4 : default(T4), arg5 != null ? (T5)arg5 : default(T5), arg6 != null ? (T6)arg6 : default(T6));
  512. return null;
  513. }
  514. public override int Run(InterpretedFrame frame) {
  515. _target((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]);
  516. frame.StackIndex -= 7;
  517. return 1;
  518. }
  519. }
  520. internal sealed class ActionCallInstruction<T0, T1, T2, T3, T4, T5, T6, T7> : CallInstruction {
  521. private readonly Action<T0, T1, T2, T3, T4, T5, T6, T7> _target;
  522. public override MethodInfo Info { get { return _target.GetMethodInfo(); } }
  523. public override int ArgumentCount { get { return 8; } }
  524. public ActionCallInstruction(Action<T0, T1, T2, T3, T4, T5, T6, T7> target) {
  525. _target = target;
  526. }
  527. public ActionCallInstruction(MethodInfo target) {
  528. _target = (Action<T0, T1, T2, T3, T4, T5, T6, T7>)target.CreateDelegate(typeof(Action<T0, T1, T2, T3, T4, T5, T6, T7>));
  529. }
  530. public override object Invoke(object arg0, object arg1, object arg2, object arg3, object arg4, object arg5, object arg6, object arg7) {
  531. _target(arg0 != null ? (T0)arg0 : default(T0), arg1 != null ? (T1)arg1 : default(T1), arg2 != null ? (T2)arg2 : default(T2), arg3 != null ? (T3)arg3 : default(T3), arg4 != null ? (T4)arg4 : default(T4), arg5 != null ? (T5)arg5 : default(T5), arg6 != null ? (T6)arg6 : default(T6), arg7 != null ? (T7)arg7 : default(T7));
  532. return null;
  533. }
  534. public override int Run(InterpretedFrame frame) {
  535. _target((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]);
  536. frame.StackIndex -= 8;
  537. return 1;
  538. }
  539. }
  540. internal sealed class ActionCallInstruction<T0, T1, T2, T3, T4, T5, T6, T7, T8> : CallInstruction {
  541. private readonly Action<T0, T1, T2, T3, T4, T5, T6, T7, T8> _target;
  542. public override MethodInfo Info { get { return _target.GetMethodInfo(); } }
  543. public override int ArgumentCount { get { return 9; } }
  544. public ActionCallInstruction(Action<T0, T1, T2, T3, T4, T5, T6, T7, T8> target) {
  545. _target = target;
  546. }
  547. public ActionCallInstruction(MethodInfo target) {
  548. _target = (Action<T0, T1, T2, T3, T4, T5, T6, T7, T8>)target.CreateDelegate(typeof(Action<T0, T1, T2, T3, T4, T5, T6, T7, T8>));
  549. }
  550. public override object Invoke(object arg0, object arg1, object arg2, object arg3, object arg4, object arg5, object arg6, object arg7, object arg8) {
  551. _target(arg0 != null ? (T0)arg0 : default(T0), arg1 != null ? (T1)arg1 : default(T1), arg2 != null ? (T2)arg2 : default(T2), arg3 != null ? (T3)arg3 : default(T3), arg4 != null ? (T4)arg4 : default(T4), arg5 != null ? (T5)arg5 : default(T5), arg6 != null ? (T6)arg6 : default(T6), arg7 != null ? (T7)arg7 : default(T7), arg8 != null ? (T8)arg8 : default(T8));
  552. return null;
  553. }
  554. public override int Run(InterpretedFrame frame) {
  555. _target((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]);
  556. frame.StackIndex -= 9;
  557. return 1;
  558. }
  559. }
  560. internal sealed class FuncCallInstruction<TRet> : CallInstruction {
  561. private readonly Func<TRet> _target;
  562. public override MethodInfo Info { get { return _target.GetMethodInfo(); } }
  563. public override int ArgumentCount { get { return 0; } }
  564. public FuncCallInstruction(Func<TRet> target) {
  565. _target = target;
  566. }
  567. public FuncCallInstruction(MethodInfo target) {
  568. _target = (Func<TRet>)target.CreateDelegate(typeof(Func<TRet>));
  569. }
  570. public override object Invoke() {
  571. return _target();
  572. }
  573. public override int Run(InterpretedFrame frame) {
  574. frame.Data[frame.StackIndex - 0] = _target();
  575. frame.StackIndex -= -1;
  576. return 1;
  577. }
  578. }
  579. internal sealed class FuncCallInstruction<T0, TRet> : CallInstruction {
  580. private readonly Func<T0, TRet> _target;
  581. public override MethodInfo Info { get { return _target.GetMethodInfo(); } }
  582. public override int ArgumentCount { get { return 1; } }
  583. public FuncCallInstruction(Func<T0, TRet> target) {
  584. _target = target;
  585. }
  586. public FuncCallInstruction(MethodInfo target) {
  587. _target = (Func<T0, TRet>)target.CreateDelegate(typeof(Func<T0, TRet>));
  588. }
  589. public override object Invoke(object arg0) {
  590. return _target(arg0 != null ? (T0)arg0 : default(T0));
  591. }
  592. public override int Run(InterpretedFrame frame) {
  593. frame.Data[frame.StackIndex - 1] = _target((T0)frame.Data[frame.StackIndex - 1]);
  594. frame.StackIndex -= 0;
  595. return 1;
  596. }
  597. }
  598. internal sealed class FuncCallInstruction<T0, T1, TRet> : CallInstruction {
  599. private readonly Func<T0, T1, TRet> _target;
  600. public override MethodInfo Info { get { return _target.GetMethodInfo(); } }
  601. public override int ArgumentCount { get { return 2; } }
  602. public FuncCallInstruction(Func<T0, T1, TRet> target) {
  603. _target = target;
  604. }
  605. public FuncCallInstruction(MethodInfo target) {
  606. _target = (Func<T0, T1, TRet>)target.CreateDelegate(typeof(Func<T0, T1, TRet>));
  607. }
  608. public override object Invoke(object arg0, object arg1) {
  609. return _target(arg0 != null ? (T0)arg0 : default(T0), arg1 != null ? (T1)arg1 : default(T1));
  610. }
  611. public override int Run(InterpretedFrame frame) {
  612. frame.Data[frame.StackIndex - 2] = _target((T0)frame.Data[frame.StackIndex - 2], (T1)frame.Data[frame.StackIndex - 1]);
  613. frame.StackIndex -= 1;
  614. return 1;
  615. }
  616. }
  617. internal sealed class FuncCallInstruction<T0, T1, T2, TRet> : CallInstruction {
  618. private readonly Func<T0, T1, T2, TRet> _target;
  619. public override MethodInfo Info { get { return _target.GetMethodInfo(); } }
  620. public override int ArgumentCount { get { return 3; } }
  621. public FuncCallInstruction(Func<T0, T1, T2, TRet> target) {
  622. _target = target;
  623. }
  624. public FuncCallInstruction(MethodInfo target) {
  625. _target = (Func<T0, T1, T2, TRet>)target.CreateDelegate(typeof(Func<T0, T1, T2, TRet>));
  626. }
  627. public override object Invoke(object arg0, object arg1, object arg2) {
  628. return _target(arg0 != null ? (T0)arg0 : default(T0), arg1 != null ? (T1)arg1 : default(T1), arg2 != null ? (T2)arg2 : default(T2));
  629. }
  630. public override int Run(InterpretedFrame frame) {
  631. frame.Data[frame.StackIndex - 3] = _target((T0)frame.Data[frame.StackIndex - 3], (T1)frame.Data[frame.StackIndex - 2], (T2)frame.Data[frame.StackIndex - 1]);
  632. frame.StackIndex -= 2;
  633. return 1;
  634. }
  635. }
  636. internal sealed class FuncCallInstruction<T0, T1, T2, T3, TRet> : CallInstruction {
  637. private readonly Func<T0, T1, T2, T3, TRet> _target;
  638. public override MethodInfo Info { get { return _target.GetMethodInfo(); } }
  639. public override int ArgumentCount { get { return 4; } }
  640. public FuncCallInstruction(Func<T0, T1, T2, T3, TRet> target) {
  641. _target = target;
  642. }
  643. public FuncCallInstruction(MethodInfo target) {
  644. _target = (Func<T0, T1, T2, T3, TRet>)target.CreateDelegate(typeof(Func<T0, T1, T2, T3, TRet>));
  645. }
  646. public override object Invoke(object arg0, object arg1, object arg2, object arg3) {
  647. return _target(arg0 != null ? (T0)arg0 : default(T0), arg1 != null ? (T1)arg1 : default(T1), arg2 != null ? (T2)arg2 : default(T2), arg3 != null ? (T3)arg3 : default(T3));
  648. }
  649. public override int Run(InterpretedFrame frame) {
  650. frame.Data[frame.StackIndex - 4] = _target((T0)frame.Data[frame.StackIndex - 4], (T1)frame.Data[frame.StackIndex - 3], (T2)frame.Data[frame.StackIndex - 2], (T3)frame.Data[frame.StackIndex - 1]);
  651. frame.StackIndex -= 3;
  652. return 1;
  653. }
  654. }
  655. internal sealed class FuncCallInstruction<T0, T1, T2, T3, T4, TRet> : CallInstruction {
  656. private readonly Func<T0, T1, T2, T3, T4, TRet> _target;
  657. public override MethodInfo Info { get { return _target.GetMethodInfo(); } }
  658. public override int ArgumentCount { get { return 5; } }
  659. public FuncCallInstruction(Func<T0, T1, T2, T3, T4, TRet> target) {
  660. _target = target;
  661. }
  662. public FuncCallInstruction(MethodInfo target) {
  663. _target = (Func<T0, T1, T2, T3, T4, TRet>)target.CreateDelegate(typeof(Func<T0, T1, T2, T3, T4, TRet>));
  664. }
  665. public override object Invoke(object arg0, object arg1, object arg2, object arg3, object arg4) {
  666. return _target(arg0 != null ? (T0)arg0 : default(T0), arg1 != null ? (T1)arg1 : default(T1), arg2 != null ? (T2)arg2 : default(T2), arg3 != null ? (T3)arg3 : default(T3), arg4 != null ? (T4)arg4 : default(T4));
  667. }
  668. public override int Run(InterpretedFrame frame) {
  669. frame.Data[frame.StackIndex - 5] = _target((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]);
  670. frame.StackIndex -= 4;
  671. return 1;
  672. }
  673. }
  674. internal sealed class FuncCallInstruction<T0, T1, T2, T3, T4, T5, TRet> : CallInstruction {
  675. private readonly Func<T0, T1, T2, T3, T4, T5, TRet> _target;
  676. public override MethodInfo Info { get { return _target.GetMethodInfo(); } }
  677. public override int ArgumentCount { get { return 6; } }
  678. public FuncCallInstruction(Func<T0, T1, T2, T3, T4, T5, TRet> target) {
  679. _target = target;
  680. }
  681. public FuncCallInstruction(MethodInfo target) {
  682. _target = (Func<T0, T1, T2, T3, T4, T5, TRet>)target.CreateDelegate(typeof(Func<T0, T1, T2, T3, T4, T5, TRet>));
  683. }
  684. public override object Invoke(object arg0, object arg1, object arg2, object arg3, object arg4, object arg5) {
  685. return _target(arg0 != null ? (T0)arg0 : default(T0), arg1 != null ? (T1)arg1 : default(T1), arg2 != null ? (T2)arg2 : default(T2), arg3 != null ? (T3)arg3 : default(T3), arg4 != null ? (T4)arg4 : default(T4), arg5 != null ? (T5)arg5 : default(T5));
  686. }
  687. public override int Run(InterpretedFrame frame) {
  688. frame.Data[frame.StackIndex - 6] = _target((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]);
  689. frame.StackIndex -= 5;
  690. return 1;
  691. }
  692. }
  693. internal sealed class FuncCallInstruction<T0, T1, T2, T3, T4, T5, T6, TRet> : CallInstruction {
  694. private readonly Func<T0, T1, T2, T3, T4, T5, T6, TRet> _target;
  695. public override MethodInfo Info { get { return _target.GetMethodInfo(); } }
  696. public override int ArgumentCount { get { return 7; } }
  697. public FuncCallInstruction(Func<T0, T1, T2, T3, T4, T5, T6, TRet> target) {
  698. _target = target;
  699. }
  700. public FuncCallInstruction(MethodInfo target) {
  701. _target = (Func<T0, T1, T2, T3, T4, T5, T6, TRet>)target.CreateDelegate(typeof(Func<T0, T1, T2, T3, T4, T5, T6, TRet>));
  702. }
  703. public override object Invoke(object arg0, object arg1, object arg2, object arg3, object arg4, object arg5, object arg6) {
  704. return _target(arg0 != null ? (T0)arg0 : default(T0), arg1 != null ? (T1)arg1 : default(T1), arg2 != null ? (T2)arg2 : default(T2), arg3 != null ? (T3)arg3 : default(T3), arg4 != null ? (T4)arg4 : default(T4), arg5 != null ? (T5)arg5 : default(T5), arg6 != null ? (T6)arg6 : default(T6));
  705. }
  706. public override int Run(InterpretedFrame frame) {
  707. frame.Data[frame.StackIndex - 7] = _target((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]);
  708. frame.StackIndex -= 6;
  709. return 1;
  710. }
  711. }
  712. internal sealed class FuncCallInstruction<T0, T1, T2, T3, T4, T5, T6, T7, TRet> : CallInstruction {
  713. private readonly Func<T0, T1, T2, T3, T4, T5, T6, T7, TRet> _target;
  714. public override MethodInfo Info { get { return _target.GetMethodInfo(); } }
  715. public override int ArgumentCount { get { return 8; } }
  716. public FuncCallInstruction(Func<T0, T1, T2, T3, T4, T5, T6, T7, TRet> target) {
  717. _target = target;
  718. }
  719. public FuncCallInstruction(MethodInfo target) {
  720. _target = (Func<T0, T1, T2, T3, T4, T5, T6, T7, TRet>)target.CreateDelegate(typeof(Func<T0, T1, T2, T3, T4, T5, T6, T7, TRet>));
  721. }
  722. public override object Invoke(object arg0, object arg1, object arg2, object arg3, object arg4, object arg5, object arg6, object arg7) {
  723. return _target(arg0 != null ? (T0)arg0 : default(T0), arg1 != null ? (T1)arg1 : default(T1), arg2 != null ? (T2)arg2 : default(T2), arg3 != null ? (T3)arg3 : default(T3), arg4 != null ? (T4)arg4 : default(T4), arg5 != null ? (T5)arg5 : default(T5), arg6 != null ? (T6)arg6 : default(T6), arg7 != null ? (T7)arg7 : default(T7));
  724. }
  725. public override int Run(InterpretedFrame frame) {
  726. frame.Data[frame.StackIndex - 8] = _target((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]);
  727. frame.StackIndex -= 7;
  728. return 1;
  729. }
  730. }
  731. internal sealed class FuncCallInstruction<T0, T1, T2, T3, T4, T5, T6, T7, T8, TRet> : CallInstruction {
  732. private readonly Func<T0, T1, T2, T3, T4, T5, T6, T7, T8, TRet> _target;
  733. public override MethodInfo Info { get { return _target.GetMethodInfo(); } }
  734. public override int ArgumentCount { get { return 9; } }
  735. public FuncCallInstruction(Func<T0, T1, T2, T3, T4, T5, T6, T7, T8, TRet> target) {
  736. _target = target;
  737. }
  738. public FuncCallInstruction(MethodInfo target) {
  739. _target = (Func<T0, T1, T2, T3, T4, T5, T6, T7, T8, TRet>)target.CreateDelegate(typeof(Func<T0, T1, T2, T3, T4, T5, T6, T7, T8, TRet>));
  740. }
  741. public override object Invoke(object arg0, object arg1, object arg2, object arg3, object arg4, object arg5, object arg6, object arg7, object arg8) {
  742. return _target(arg0 != null ? (T0)arg0 : default(T0), arg1 != null ? (T1)arg1 : default(T1), arg2 != null ? (T2)arg2 : default(T2), arg3 != null ? (T3)arg3 : default(T3), arg4 != null ? (T4)arg4 : default(T4), arg5 != null ? (T5)arg5 : default(T5), arg6 != null ? (T6)arg6 : default(T6), arg7 != null ? (T7)arg7 : default(T7), arg8 != null ? (T8)arg8 : default(T8));
  743. }
  744. public override int Run(InterpretedFrame frame) {
  745. frame.Data[frame.StackIndex - 9] = _target((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]);
  746. frame.StackIndex -= 8;
  747. return 1;
  748. }
  749. }
  750. internal sealed partial class MethodInfoCallInstruction : CallInstruction {
  751. public override object Invoke() {
  752. return InvokeWorker();
  753. }
  754. public override object Invoke(object arg0) {
  755. return InvokeWorker(arg0);
  756. }
  757. public override object Invoke(object arg0, object arg1) {
  758. return InvokeWorker(arg0, arg1);
  759. }
  760. }
  761. // *** END GENERATED CODE ***
  762. #endregion
  763. }