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 * ***************************************************************************/
16 using Microsoft.Scripting.Utils;
19 using System.Runtime.CompilerServices;
20 using System.Threading;
22 namespace System.Dynamic {
23 internal static partial class UpdateDelegates {
26 // WARNING: do not edit these methods here. The real source code lives
27 // in two places: generate_dynsites.py, which generates the methods in
28 // this file, and UpdateDelegates.cs, which dynamically generates
29 // methods like these at run time. If you want to make a change, edit
30 // *both* of those files instead
33 #region Generated UpdateAndExecute Methods
35 // *** BEGIN GENERATED CODE ***
36 // generated by function: gen_update_targets from: generate_dynsites.py
39 [Obsolete("pregenerated CallSite<T>.Update delegate", true)]
40 internal static TRet UpdateAndExecute0<TRet>(CallSite site) {
42 // Declare the locals here upfront. It actually saves JIT stack space.
44 var @this = (CallSite<Func<CallSite, TRet>>)site;
45 Func<CallSite, TRet>[] applicable;
46 Func<CallSite, TRet> rule, originalRule = @this.Target;
51 // Create matchmaker and its site. We'll need them regardless.
53 site = CallSiteOps.CreateMatchmaker(@this);
56 // Level 1 cache lookup
58 if ((applicable = CallSiteOps.GetRules(@this)) != null) {
59 for (int i = 0; i < applicable.Length; i++) {
66 // if we've already tried it skip it...
67 if ((object)rule != (object)originalRule) {
71 if (CallSiteOps.GetMatch(site)) {
72 CallSiteOps.UpdateRules(@this, i);
76 // Rule didn't match, try the next one
77 CallSiteOps.ClearMatch(site);
83 // Level 2 cache lookup
87 // Any applicable rules in level 2 cache?
90 var cache = CallSiteOps.GetRuleCache(@this);
92 applicable = cache.GetRules();
93 for (int i = 0; i < applicable.Length; i++) {
103 if (CallSiteOps.GetMatch(site)) {
107 if (CallSiteOps.GetMatch(site)) {
109 // Rule worked. Add it to level 1 cache
111 CallSiteOps.AddRule(@this, rule);
112 // and then move it to the front of the L2 cache
113 CallSiteOps.MoveRule(cache, rule, i);
117 // Rule didn't match, try the next one
118 CallSiteOps.ClearMatch(site);
122 // Miss on Level 0, 1 and 2 caches. Create new rule
126 var args = new object[] { };
129 @this.Target = originalRule;
130 rule = @this.Target = @this.Binder.BindCore(@this, args);
133 // Execute the rule on the matchmaker site
138 if (CallSiteOps.GetMatch(site)) {
142 if (CallSiteOps.GetMatch(site)) {
144 // The rule worked. Add it to level 1 cache.
146 CallSiteOps.AddRule(@this, rule);
150 // Rule we got back didn't work, try another one
151 CallSiteOps.ClearMatch(site);
155 [Obsolete("pregenerated CallSite<T>.Update delegate", true)]
156 [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters")]
157 internal static TRet NoMatch0<TRet>(CallSite site) {
159 return default(TRet);
164 [Obsolete("pregenerated CallSite<T>.Update delegate", true)]
165 internal static TRet UpdateAndExecute1<T0, TRet>(CallSite site, T0 arg0) {
167 // Declare the locals here upfront. It actually saves JIT stack space.
169 var @this = (CallSite<Func<CallSite, T0, TRet>>)site;
170 Func<CallSite, T0, TRet>[] applicable;
171 Func<CallSite, T0, TRet> rule, originalRule = @this.Target;
176 // Create matchmaker and its site. We'll need them regardless.
178 site = CallSiteOps.CreateMatchmaker(@this);
181 // Level 1 cache lookup
183 if ((applicable = CallSiteOps.GetRules(@this)) != null) {
184 for (int i = 0; i < applicable.Length; i++) {
185 rule = applicable[i];
191 // if we've already tried it skip it...
192 if ((object)rule != (object)originalRule) {
194 result = rule(site, arg0);
196 if (CallSiteOps.GetMatch(site)) {
197 CallSiteOps.UpdateRules(@this, i);
201 // Rule didn't match, try the next one
202 CallSiteOps.ClearMatch(site);
208 // Level 2 cache lookup
212 // Any applicable rules in level 2 cache?
215 var cache = CallSiteOps.GetRuleCache(@this);
217 applicable = cache.GetRules();
218 for (int i = 0; i < applicable.Length; i++) {
219 rule = applicable[i];
227 result = rule(site, arg0);
228 if (CallSiteOps.GetMatch(site)) {
232 if (CallSiteOps.GetMatch(site)) {
234 // Rule worked. Add it to level 1 cache
236 CallSiteOps.AddRule(@this, rule);
237 // and then move it to the front of the L2 cache
238 CallSiteOps.MoveRule(cache, rule, i);
242 // Rule didn't match, try the next one
243 CallSiteOps.ClearMatch(site);
247 // Miss on Level 0, 1 and 2 caches. Create new rule
251 var args = new object[] { arg0 };
254 @this.Target = originalRule;
255 rule = @this.Target = @this.Binder.BindCore(@this, args);
258 // Execute the rule on the matchmaker site
262 result = rule(site, arg0);
263 if (CallSiteOps.GetMatch(site)) {
267 if (CallSiteOps.GetMatch(site)) {
269 // The rule worked. Add it to level 1 cache.
271 CallSiteOps.AddRule(@this, rule);
275 // Rule we got back didn't work, try another one
276 CallSiteOps.ClearMatch(site);
280 [Obsolete("pregenerated CallSite<T>.Update delegate", true)]
281 [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters")]
282 internal static TRet NoMatch1<T0, TRet>(CallSite site, T0 arg0) {
284 return default(TRet);
289 [Obsolete("pregenerated CallSite<T>.Update delegate", true)]
290 internal static TRet UpdateAndExecute2<T0, T1, TRet>(CallSite site, T0 arg0, T1 arg1) {
292 // Declare the locals here upfront. It actually saves JIT stack space.
294 var @this = (CallSite<Func<CallSite, T0, T1, TRet>>)site;
295 Func<CallSite, T0, T1, TRet>[] applicable;
296 Func<CallSite, T0, T1, TRet> rule, originalRule = @this.Target;
301 // Create matchmaker and its site. We'll need them regardless.
303 site = CallSiteOps.CreateMatchmaker(@this);
306 // Level 1 cache lookup
308 if ((applicable = CallSiteOps.GetRules(@this)) != null) {
309 for (int i = 0; i < applicable.Length; i++) {
310 rule = applicable[i];
316 // if we've already tried it skip it...
317 if ((object)rule != (object)originalRule) {
319 result = rule(site, arg0, arg1);
321 if (CallSiteOps.GetMatch(site)) {
322 CallSiteOps.UpdateRules(@this, i);
326 // Rule didn't match, try the next one
327 CallSiteOps.ClearMatch(site);
333 // Level 2 cache lookup
337 // Any applicable rules in level 2 cache?
340 var cache = CallSiteOps.GetRuleCache(@this);
342 applicable = cache.GetRules();
343 for (int i = 0; i < applicable.Length; i++) {
344 rule = applicable[i];
352 result = rule(site, arg0, arg1);
353 if (CallSiteOps.GetMatch(site)) {
357 if (CallSiteOps.GetMatch(site)) {
359 // Rule worked. Add it to level 1 cache
361 CallSiteOps.AddRule(@this, rule);
362 // and then move it to the front of the L2 cache
363 CallSiteOps.MoveRule(cache, rule, i);
367 // Rule didn't match, try the next one
368 CallSiteOps.ClearMatch(site);
372 // Miss on Level 0, 1 and 2 caches. Create new rule
376 var args = new object[] { arg0, arg1 };
379 @this.Target = originalRule;
380 rule = @this.Target = @this.Binder.BindCore(@this, args);
383 // Execute the rule on the matchmaker site
387 result = rule(site, arg0, arg1);
388 if (CallSiteOps.GetMatch(site)) {
392 if (CallSiteOps.GetMatch(site)) {
394 // The rule worked. Add it to level 1 cache.
396 CallSiteOps.AddRule(@this, rule);
400 // Rule we got back didn't work, try another one
401 CallSiteOps.ClearMatch(site);
405 [Obsolete("pregenerated CallSite<T>.Update delegate", true)]
406 [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters")]
407 internal static TRet NoMatch2<T0, T1, TRet>(CallSite site, T0 arg0, T1 arg1) {
409 return default(TRet);
414 [Obsolete("pregenerated CallSite<T>.Update delegate", true)]
415 internal static TRet UpdateAndExecute3<T0, T1, T2, TRet>(CallSite site, T0 arg0, T1 arg1, T2 arg2) {
417 // Declare the locals here upfront. It actually saves JIT stack space.
419 var @this = (CallSite<Func<CallSite, T0, T1, T2, TRet>>)site;
420 Func<CallSite, T0, T1, T2, TRet>[] applicable;
421 Func<CallSite, T0, T1, T2, TRet> rule, originalRule = @this.Target;
426 // Create matchmaker and its site. We'll need them regardless.
428 site = CallSiteOps.CreateMatchmaker(@this);
431 // Level 1 cache lookup
433 if ((applicable = CallSiteOps.GetRules(@this)) != null) {
434 for (int i = 0; i < applicable.Length; i++) {
435 rule = applicable[i];
441 // if we've already tried it skip it...
442 if ((object)rule != (object)originalRule) {
444 result = rule(site, arg0, arg1, arg2);
446 if (CallSiteOps.GetMatch(site)) {
447 CallSiteOps.UpdateRules(@this, i);
451 // Rule didn't match, try the next one
452 CallSiteOps.ClearMatch(site);
458 // Level 2 cache lookup
462 // Any applicable rules in level 2 cache?
465 var cache = CallSiteOps.GetRuleCache(@this);
467 applicable = cache.GetRules();
468 for (int i = 0; i < applicable.Length; i++) {
469 rule = applicable[i];
477 result = rule(site, arg0, arg1, arg2);
478 if (CallSiteOps.GetMatch(site)) {
482 if (CallSiteOps.GetMatch(site)) {
484 // Rule worked. Add it to level 1 cache
486 CallSiteOps.AddRule(@this, rule);
487 // and then move it to the front of the L2 cache
488 CallSiteOps.MoveRule(cache, rule, i);
492 // Rule didn't match, try the next one
493 CallSiteOps.ClearMatch(site);
497 // Miss on Level 0, 1 and 2 caches. Create new rule
501 var args = new object[] { arg0, arg1, arg2 };
504 @this.Target = originalRule;
505 rule = @this.Target = @this.Binder.BindCore(@this, args);
508 // Execute the rule on the matchmaker site
512 result = rule(site, arg0, arg1, arg2);
513 if (CallSiteOps.GetMatch(site)) {
517 if (CallSiteOps.GetMatch(site)) {
519 // The rule worked. Add it to level 1 cache.
521 CallSiteOps.AddRule(@this, rule);
525 // Rule we got back didn't work, try another one
526 CallSiteOps.ClearMatch(site);
530 [Obsolete("pregenerated CallSite<T>.Update delegate", true)]
531 [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters")]
532 internal static TRet NoMatch3<T0, T1, T2, TRet>(CallSite site, T0 arg0, T1 arg1, T2 arg2) {
534 return default(TRet);
539 [Obsolete("pregenerated CallSite<T>.Update delegate", true)]
540 internal static TRet UpdateAndExecute4<T0, T1, T2, T3, TRet>(CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3) {
542 // Declare the locals here upfront. It actually saves JIT stack space.
544 var @this = (CallSite<Func<CallSite, T0, T1, T2, T3, TRet>>)site;
545 Func<CallSite, T0, T1, T2, T3, TRet>[] applicable;
546 Func<CallSite, T0, T1, T2, T3, TRet> rule, originalRule = @this.Target;
551 // Create matchmaker and its site. We'll need them regardless.
553 site = CallSiteOps.CreateMatchmaker(@this);
556 // Level 1 cache lookup
558 if ((applicable = CallSiteOps.GetRules(@this)) != null) {
559 for (int i = 0; i < applicable.Length; i++) {
560 rule = applicable[i];
566 // if we've already tried it skip it...
567 if ((object)rule != (object)originalRule) {
569 result = rule(site, arg0, arg1, arg2, arg3);
571 if (CallSiteOps.GetMatch(site)) {
572 CallSiteOps.UpdateRules(@this, i);
576 // Rule didn't match, try the next one
577 CallSiteOps.ClearMatch(site);
583 // Level 2 cache lookup
587 // Any applicable rules in level 2 cache?
590 var cache = CallSiteOps.GetRuleCache(@this);
592 applicable = cache.GetRules();
593 for (int i = 0; i < applicable.Length; i++) {
594 rule = applicable[i];
602 result = rule(site, arg0, arg1, arg2, arg3);
603 if (CallSiteOps.GetMatch(site)) {
607 if (CallSiteOps.GetMatch(site)) {
609 // Rule worked. Add it to level 1 cache
611 CallSiteOps.AddRule(@this, rule);
612 // and then move it to the front of the L2 cache
613 CallSiteOps.MoveRule(cache, rule, i);
617 // Rule didn't match, try the next one
618 CallSiteOps.ClearMatch(site);
622 // Miss on Level 0, 1 and 2 caches. Create new rule
626 var args = new object[] { arg0, arg1, arg2, arg3 };
629 @this.Target = originalRule;
630 rule = @this.Target = @this.Binder.BindCore(@this, args);
633 // Execute the rule on the matchmaker site
637 result = rule(site, arg0, arg1, arg2, arg3);
638 if (CallSiteOps.GetMatch(site)) {
642 if (CallSiteOps.GetMatch(site)) {
644 // The rule worked. Add it to level 1 cache.
646 CallSiteOps.AddRule(@this, rule);
650 // Rule we got back didn't work, try another one
651 CallSiteOps.ClearMatch(site);
655 [Obsolete("pregenerated CallSite<T>.Update delegate", true)]
656 [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters")]
657 internal static TRet NoMatch4<T0, T1, T2, T3, TRet>(CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3) {
659 return default(TRet);
664 [Obsolete("pregenerated CallSite<T>.Update delegate", true)]
665 internal static TRet UpdateAndExecute5<T0, T1, T2, T3, T4, TRet>(CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4) {
667 // Declare the locals here upfront. It actually saves JIT stack space.
669 var @this = (CallSite<Func<CallSite, T0, T1, T2, T3, T4, TRet>>)site;
670 Func<CallSite, T0, T1, T2, T3, T4, TRet>[] applicable;
671 Func<CallSite, T0, T1, T2, T3, T4, TRet> rule, originalRule = @this.Target;
676 // Create matchmaker and its site. We'll need them regardless.
678 site = CallSiteOps.CreateMatchmaker(@this);
681 // Level 1 cache lookup
683 if ((applicable = CallSiteOps.GetRules(@this)) != null) {
684 for (int i = 0; i < applicable.Length; i++) {
685 rule = applicable[i];
691 // if we've already tried it skip it...
692 if ((object)rule != (object)originalRule) {
694 result = rule(site, arg0, arg1, arg2, arg3, arg4);
696 if (CallSiteOps.GetMatch(site)) {
697 CallSiteOps.UpdateRules(@this, i);
701 // Rule didn't match, try the next one
702 CallSiteOps.ClearMatch(site);
708 // Level 2 cache lookup
712 // Any applicable rules in level 2 cache?
715 var cache = CallSiteOps.GetRuleCache(@this);
717 applicable = cache.GetRules();
718 for (int i = 0; i < applicable.Length; i++) {
719 rule = applicable[i];
727 result = rule(site, arg0, arg1, arg2, arg3, arg4);
728 if (CallSiteOps.GetMatch(site)) {
732 if (CallSiteOps.GetMatch(site)) {
734 // Rule worked. Add it to level 1 cache
736 CallSiteOps.AddRule(@this, rule);
737 // and then move it to the front of the L2 cache
738 CallSiteOps.MoveRule(cache, rule, i);
742 // Rule didn't match, try the next one
743 CallSiteOps.ClearMatch(site);
747 // Miss on Level 0, 1 and 2 caches. Create new rule
751 var args = new object[] { arg0, arg1, arg2, arg3, arg4 };
754 @this.Target = originalRule;
755 rule = @this.Target = @this.Binder.BindCore(@this, args);
758 // Execute the rule on the matchmaker site
762 result = rule(site, arg0, arg1, arg2, arg3, arg4);
763 if (CallSiteOps.GetMatch(site)) {
767 if (CallSiteOps.GetMatch(site)) {
769 // The rule worked. Add it to level 1 cache.
771 CallSiteOps.AddRule(@this, rule);
775 // Rule we got back didn't work, try another one
776 CallSiteOps.ClearMatch(site);
780 [Obsolete("pregenerated CallSite<T>.Update delegate", true)]
781 [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters")]
782 internal static TRet NoMatch5<T0, T1, T2, T3, T4, TRet>(CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4) {
784 return default(TRet);
789 [Obsolete("pregenerated CallSite<T>.Update delegate", true)]
790 internal static TRet UpdateAndExecute6<T0, T1, T2, T3, T4, T5, TRet>(CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5) {
792 // Declare the locals here upfront. It actually saves JIT stack space.
794 var @this = (CallSite<Func<CallSite, T0, T1, T2, T3, T4, T5, TRet>>)site;
795 Func<CallSite, T0, T1, T2, T3, T4, T5, TRet>[] applicable;
796 Func<CallSite, T0, T1, T2, T3, T4, T5, TRet> rule, originalRule = @this.Target;
801 // Create matchmaker and its site. We'll need them regardless.
803 site = CallSiteOps.CreateMatchmaker(@this);
806 // Level 1 cache lookup
808 if ((applicable = CallSiteOps.GetRules(@this)) != null) {
809 for (int i = 0; i < applicable.Length; i++) {
810 rule = applicable[i];
816 // if we've already tried it skip it...
817 if ((object)rule != (object)originalRule) {
819 result = rule(site, arg0, arg1, arg2, arg3, arg4, arg5);
821 if (CallSiteOps.GetMatch(site)) {
822 CallSiteOps.UpdateRules(@this, i);
826 // Rule didn't match, try the next one
827 CallSiteOps.ClearMatch(site);
833 // Level 2 cache lookup
837 // Any applicable rules in level 2 cache?
840 var cache = CallSiteOps.GetRuleCache(@this);
842 applicable = cache.GetRules();
843 for (int i = 0; i < applicable.Length; i++) {
844 rule = applicable[i];
852 result = rule(site, arg0, arg1, arg2, arg3, arg4, arg5);
853 if (CallSiteOps.GetMatch(site)) {
857 if (CallSiteOps.GetMatch(site)) {
859 // Rule worked. Add it to level 1 cache
861 CallSiteOps.AddRule(@this, rule);
862 // and then move it to the front of the L2 cache
863 CallSiteOps.MoveRule(cache, rule, i);
867 // Rule didn't match, try the next one
868 CallSiteOps.ClearMatch(site);
872 // Miss on Level 0, 1 and 2 caches. Create new rule
876 var args = new object[] { arg0, arg1, arg2, arg3, arg4, arg5 };
879 @this.Target = originalRule;
880 rule = @this.Target = @this.Binder.BindCore(@this, args);
883 // Execute the rule on the matchmaker site
887 result = rule(site, arg0, arg1, arg2, arg3, arg4, arg5);
888 if (CallSiteOps.GetMatch(site)) {
892 if (CallSiteOps.GetMatch(site)) {
894 // The rule worked. Add it to level 1 cache.
896 CallSiteOps.AddRule(@this, rule);
900 // Rule we got back didn't work, try another one
901 CallSiteOps.ClearMatch(site);
905 [Obsolete("pregenerated CallSite<T>.Update delegate", true)]
906 [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters")]
907 internal static TRet NoMatch6<T0, T1, T2, T3, T4, T5, TRet>(CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5) {
909 return default(TRet);
914 [Obsolete("pregenerated CallSite<T>.Update delegate", true)]
915 internal static TRet UpdateAndExecute7<T0, T1, T2, T3, T4, T5, T6, TRet>(CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6) {
917 // Declare the locals here upfront. It actually saves JIT stack space.
919 var @this = (CallSite<Func<CallSite, T0, T1, T2, T3, T4, T5, T6, TRet>>)site;
920 Func<CallSite, T0, T1, T2, T3, T4, T5, T6, TRet>[] applicable;
921 Func<CallSite, T0, T1, T2, T3, T4, T5, T6, TRet> rule, originalRule = @this.Target;
926 // Create matchmaker and its site. We'll need them regardless.
928 site = CallSiteOps.CreateMatchmaker(@this);
931 // Level 1 cache lookup
933 if ((applicable = CallSiteOps.GetRules(@this)) != null) {
934 for (int i = 0; i < applicable.Length; i++) {
935 rule = applicable[i];
941 // if we've already tried it skip it...
942 if ((object)rule != (object)originalRule) {
944 result = rule(site, arg0, arg1, arg2, arg3, arg4, arg5, arg6);
946 if (CallSiteOps.GetMatch(site)) {
947 CallSiteOps.UpdateRules(@this, i);
951 // Rule didn't match, try the next one
952 CallSiteOps.ClearMatch(site);
958 // Level 2 cache lookup
962 // Any applicable rules in level 2 cache?
965 var cache = CallSiteOps.GetRuleCache(@this);
967 applicable = cache.GetRules();
968 for (int i = 0; i < applicable.Length; i++) {
969 rule = applicable[i];
977 result = rule(site, arg0, arg1, arg2, arg3, arg4, arg5, arg6);
978 if (CallSiteOps.GetMatch(site)) {
982 if (CallSiteOps.GetMatch(site)) {
984 // Rule worked. Add it to level 1 cache
986 CallSiteOps.AddRule(@this, rule);
987 // and then move it to the front of the L2 cache
988 CallSiteOps.MoveRule(cache, rule, i);
992 // Rule didn't match, try the next one
993 CallSiteOps.ClearMatch(site);
997 // Miss on Level 0, 1 and 2 caches. Create new rule
1001 var args = new object[] { arg0, arg1, arg2, arg3, arg4, arg5, arg6 };
1004 @this.Target = originalRule;
1005 rule = @this.Target = @this.Binder.BindCore(@this, args);
1008 // Execute the rule on the matchmaker site
1012 result = rule(site, arg0, arg1, arg2, arg3, arg4, arg5, arg6);
1013 if (CallSiteOps.GetMatch(site)) {
1017 if (CallSiteOps.GetMatch(site)) {
1019 // The rule worked. Add it to level 1 cache.
1021 CallSiteOps.AddRule(@this, rule);
1025 // Rule we got back didn't work, try another one
1026 CallSiteOps.ClearMatch(site);
1030 [Obsolete("pregenerated CallSite<T>.Update delegate", true)]
1031 [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters")]
1032 internal static TRet NoMatch7<T0, T1, T2, T3, T4, T5, T6, TRet>(CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6) {
1033 site._match = false;
1034 return default(TRet);
1039 [Obsolete("pregenerated CallSite<T>.Update delegate", true)]
1040 internal static TRet UpdateAndExecute8<T0, T1, T2, T3, T4, T5, T6, T7, TRet>(CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7) {
1042 // Declare the locals here upfront. It actually saves JIT stack space.
1044 var @this = (CallSite<Func<CallSite, T0, T1, T2, T3, T4, T5, T6, T7, TRet>>)site;
1045 Func<CallSite, T0, T1, T2, T3, T4, T5, T6, T7, TRet>[] applicable;
1046 Func<CallSite, T0, T1, T2, T3, T4, T5, T6, T7, TRet> rule, originalRule = @this.Target;
1051 // Create matchmaker and its site. We'll need them regardless.
1053 site = CallSiteOps.CreateMatchmaker(@this);
1056 // Level 1 cache lookup
1058 if ((applicable = CallSiteOps.GetRules(@this)) != null) {
1059 for (int i = 0; i < applicable.Length; i++) {
1060 rule = applicable[i];
1066 // if we've already tried it skip it...
1067 if ((object)rule != (object)originalRule) {
1068 @this.Target = rule;
1069 result = rule(site, arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7);
1071 if (CallSiteOps.GetMatch(site)) {
1072 CallSiteOps.UpdateRules(@this, i);
1076 // Rule didn't match, try the next one
1077 CallSiteOps.ClearMatch(site);
1083 // Level 2 cache lookup
1087 // Any applicable rules in level 2 cache?
1090 var cache = CallSiteOps.GetRuleCache(@this);
1092 applicable = cache.GetRules();
1093 for (int i = 0; i < applicable.Length; i++) {
1094 rule = applicable[i];
1099 @this.Target = rule;
1102 result = rule(site, arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7);
1103 if (CallSiteOps.GetMatch(site)) {
1107 if (CallSiteOps.GetMatch(site)) {
1109 // Rule worked. Add it to level 1 cache
1111 CallSiteOps.AddRule(@this, rule);
1112 // and then move it to the front of the L2 cache
1113 CallSiteOps.MoveRule(cache, rule, i);
1117 // Rule didn't match, try the next one
1118 CallSiteOps.ClearMatch(site);
1122 // Miss on Level 0, 1 and 2 caches. Create new rule
1126 var args = new object[] { arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7 };
1129 @this.Target = originalRule;
1130 rule = @this.Target = @this.Binder.BindCore(@this, args);
1133 // Execute the rule on the matchmaker site
1137 result = rule(site, arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7);
1138 if (CallSiteOps.GetMatch(site)) {
1142 if (CallSiteOps.GetMatch(site)) {
1144 // The rule worked. Add it to level 1 cache.
1146 CallSiteOps.AddRule(@this, rule);
1150 // Rule we got back didn't work, try another one
1151 CallSiteOps.ClearMatch(site);
1155 [Obsolete("pregenerated CallSite<T>.Update delegate", true)]
1156 [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters")]
1157 internal static TRet NoMatch8<T0, T1, T2, T3, T4, T5, T6, T7, TRet>(CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7) {
1158 site._match = false;
1159 return default(TRet);
1164 [Obsolete("pregenerated CallSite<T>.Update delegate", true)]
1165 internal static TRet UpdateAndExecute9<T0, T1, T2, T3, T4, T5, T6, T7, T8, TRet>(CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8) {
1167 // Declare the locals here upfront. It actually saves JIT stack space.
1169 var @this = (CallSite<Func<CallSite, T0, T1, T2, T3, T4, T5, T6, T7, T8, TRet>>)site;
1170 Func<CallSite, T0, T1, T2, T3, T4, T5, T6, T7, T8, TRet>[] applicable;
1171 Func<CallSite, T0, T1, T2, T3, T4, T5, T6, T7, T8, TRet> rule, originalRule = @this.Target;
1176 // Create matchmaker and its site. We'll need them regardless.
1178 site = CallSiteOps.CreateMatchmaker(@this);
1181 // Level 1 cache lookup
1183 if ((applicable = CallSiteOps.GetRules(@this)) != null) {
1184 for (int i = 0; i < applicable.Length; i++) {
1185 rule = applicable[i];
1191 // if we've already tried it skip it...
1192 if ((object)rule != (object)originalRule) {
1193 @this.Target = rule;
1194 result = rule(site, arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
1196 if (CallSiteOps.GetMatch(site)) {
1197 CallSiteOps.UpdateRules(@this, i);
1201 // Rule didn't match, try the next one
1202 CallSiteOps.ClearMatch(site);
1208 // Level 2 cache lookup
1212 // Any applicable rules in level 2 cache?
1215 var cache = CallSiteOps.GetRuleCache(@this);
1217 applicable = cache.GetRules();
1218 for (int i = 0; i < applicable.Length; i++) {
1219 rule = applicable[i];
1224 @this.Target = rule;
1227 result = rule(site, arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
1228 if (CallSiteOps.GetMatch(site)) {
1232 if (CallSiteOps.GetMatch(site)) {
1234 // Rule worked. Add it to level 1 cache
1236 CallSiteOps.AddRule(@this, rule);
1237 // and then move it to the front of the L2 cache
1238 CallSiteOps.MoveRule(cache, rule, i);
1242 // Rule didn't match, try the next one
1243 CallSiteOps.ClearMatch(site);
1247 // Miss on Level 0, 1 and 2 caches. Create new rule
1251 var args = new object[] { arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8 };
1254 @this.Target = originalRule;
1255 rule = @this.Target = @this.Binder.BindCore(@this, args);
1258 // Execute the rule on the matchmaker site
1262 result = rule(site, arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
1263 if (CallSiteOps.GetMatch(site)) {
1267 if (CallSiteOps.GetMatch(site)) {
1269 // The rule worked. Add it to level 1 cache.
1271 CallSiteOps.AddRule(@this, rule);
1275 // Rule we got back didn't work, try another one
1276 CallSiteOps.ClearMatch(site);
1280 [Obsolete("pregenerated CallSite<T>.Update delegate", true)]
1281 [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters")]
1282 internal static TRet NoMatch9<T0, T1, T2, T3, T4, T5, T6, T7, T8, TRet>(CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8) {
1283 site._match = false;
1284 return default(TRet);
1289 [Obsolete("pregenerated CallSite<T>.Update delegate", true)]
1290 internal static TRet UpdateAndExecute10<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, TRet>(CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9) {
1292 // Declare the locals here upfront. It actually saves JIT stack space.
1294 var @this = (CallSite<Func<CallSite, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, TRet>>)site;
1295 Func<CallSite, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, TRet>[] applicable;
1296 Func<CallSite, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, TRet> rule, originalRule = @this.Target;
1301 // Create matchmaker and its site. We'll need them regardless.
1303 site = CallSiteOps.CreateMatchmaker(@this);
1306 // Level 1 cache lookup
1308 if ((applicable = CallSiteOps.GetRules(@this)) != null) {
1309 for (int i = 0; i < applicable.Length; i++) {
1310 rule = applicable[i];
1316 // if we've already tried it skip it...
1317 if ((object)rule != (object)originalRule) {
1318 @this.Target = rule;
1319 result = rule(site, arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9);
1321 if (CallSiteOps.GetMatch(site)) {
1322 CallSiteOps.UpdateRules(@this, i);
1326 // Rule didn't match, try the next one
1327 CallSiteOps.ClearMatch(site);
1333 // Level 2 cache lookup
1337 // Any applicable rules in level 2 cache?
1340 var cache = CallSiteOps.GetRuleCache(@this);
1342 applicable = cache.GetRules();
1343 for (int i = 0; i < applicable.Length; i++) {
1344 rule = applicable[i];
1349 @this.Target = rule;
1352 result = rule(site, arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9);
1353 if (CallSiteOps.GetMatch(site)) {
1357 if (CallSiteOps.GetMatch(site)) {
1359 // Rule worked. Add it to level 1 cache
1361 CallSiteOps.AddRule(@this, rule);
1362 // and then move it to the front of the L2 cache
1363 CallSiteOps.MoveRule(cache, rule, i);
1367 // Rule didn't match, try the next one
1368 CallSiteOps.ClearMatch(site);
1372 // Miss on Level 0, 1 and 2 caches. Create new rule
1376 var args = new object[] { arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9 };
1379 @this.Target = originalRule;
1380 rule = @this.Target = @this.Binder.BindCore(@this, args);
1383 // Execute the rule on the matchmaker site
1387 result = rule(site, arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9);
1388 if (CallSiteOps.GetMatch(site)) {
1392 if (CallSiteOps.GetMatch(site)) {
1394 // The rule worked. Add it to level 1 cache.
1396 CallSiteOps.AddRule(@this, rule);
1400 // Rule we got back didn't work, try another one
1401 CallSiteOps.ClearMatch(site);
1405 [Obsolete("pregenerated CallSite<T>.Update delegate", true)]
1406 [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters")]
1407 internal static TRet NoMatch10<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, TRet>(CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9) {
1408 site._match = false;
1409 return default(TRet);
1414 [Obsolete("pregenerated CallSite<T>.Update delegate", true)]
1415 internal static void UpdateAndExecuteVoid1<T0>(CallSite site, T0 arg0) {
1417 // Declare the locals here upfront. It actually saves JIT stack space.
1419 var @this = (CallSite<Action<CallSite, T0>>)site;
1420 Action<CallSite, T0>[] applicable;
1421 Action<CallSite, T0> rule, originalRule = @this.Target;
1425 // Create matchmaker and its site. We'll need them regardless.
1427 site = CallSiteOps.CreateMatchmaker(@this);
1430 // Level 1 cache lookup
1432 if ((applicable = CallSiteOps.GetRules(@this)) != null) {
1433 for (int i = 0; i < applicable.Length; i++) {
1434 rule = applicable[i];
1440 // if we've already tried it skip it...
1441 if ((object)rule != (object)originalRule) {
1442 @this.Target = rule;
1445 if (CallSiteOps.GetMatch(site)) {
1446 CallSiteOps.UpdateRules(@this, i);
1450 // Rule didn't match, try the next one
1451 CallSiteOps.ClearMatch(site);
1457 // Level 2 cache lookup
1461 // Any applicable rules in level 2 cache?
1464 var cache = CallSiteOps.GetRuleCache(@this);
1466 applicable = cache.GetRules();
1467 for (int i = 0; i < applicable.Length; i++) {
1468 rule = applicable[i];
1473 @this.Target = rule;
1477 if (CallSiteOps.GetMatch(site)) {
1481 if (CallSiteOps.GetMatch(site)) {
1483 // Rule worked. Add it to level 1 cache
1485 CallSiteOps.AddRule(@this, rule);
1486 // and then move it to the front of the L2 cache
1487 CallSiteOps.MoveRule(cache, rule, i);
1491 // Rule didn't match, try the next one
1492 CallSiteOps.ClearMatch(site);
1496 // Miss on Level 0, 1 and 2 caches. Create new rule
1500 var args = new object[] { arg0 };
1503 @this.Target = originalRule;
1504 rule = @this.Target = @this.Binder.BindCore(@this, args);
1507 // Execute the rule on the matchmaker site
1512 if (CallSiteOps.GetMatch(site)) {
1516 if (CallSiteOps.GetMatch(site)) {
1518 // The rule worked. Add it to level 1 cache.
1520 CallSiteOps.AddRule(@this, rule);
1524 // Rule we got back didn't work, try another one
1525 CallSiteOps.ClearMatch(site);
1529 [Obsolete("pregenerated CallSite<T>.Update delegate", true)]
1530 [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters")]
1531 internal static void NoMatchVoid1<T0>(CallSite site, T0 arg0) {
1532 site._match = false;
1538 [Obsolete("pregenerated CallSite<T>.Update delegate", true)]
1539 internal static void UpdateAndExecuteVoid2<T0, T1>(CallSite site, T0 arg0, T1 arg1) {
1541 // Declare the locals here upfront. It actually saves JIT stack space.
1543 var @this = (CallSite<Action<CallSite, T0, T1>>)site;
1544 Action<CallSite, T0, T1>[] applicable;
1545 Action<CallSite, T0, T1> rule, originalRule = @this.Target;
1549 // Create matchmaker and its site. We'll need them regardless.
1551 site = CallSiteOps.CreateMatchmaker(@this);
1554 // Level 1 cache lookup
1556 if ((applicable = CallSiteOps.GetRules(@this)) != null) {
1557 for (int i = 0; i < applicable.Length; i++) {
1558 rule = applicable[i];
1564 // if we've already tried it skip it...
1565 if ((object)rule != (object)originalRule) {
1566 @this.Target = rule;
1567 rule(site, arg0, arg1);
1569 if (CallSiteOps.GetMatch(site)) {
1570 CallSiteOps.UpdateRules(@this, i);
1574 // Rule didn't match, try the next one
1575 CallSiteOps.ClearMatch(site);
1581 // Level 2 cache lookup
1585 // Any applicable rules in level 2 cache?
1588 var cache = CallSiteOps.GetRuleCache(@this);
1590 applicable = cache.GetRules();
1591 for (int i = 0; i < applicable.Length; i++) {
1592 rule = applicable[i];
1597 @this.Target = rule;
1600 rule(site, arg0, arg1);
1601 if (CallSiteOps.GetMatch(site)) {
1605 if (CallSiteOps.GetMatch(site)) {
1607 // Rule worked. Add it to level 1 cache
1609 CallSiteOps.AddRule(@this, rule);
1610 // and then move it to the front of the L2 cache
1611 CallSiteOps.MoveRule(cache, rule, i);
1615 // Rule didn't match, try the next one
1616 CallSiteOps.ClearMatch(site);
1620 // Miss on Level 0, 1 and 2 caches. Create new rule
1624 var args = new object[] { arg0, arg1 };
1627 @this.Target = originalRule;
1628 rule = @this.Target = @this.Binder.BindCore(@this, args);
1631 // Execute the rule on the matchmaker site
1635 rule(site, arg0, arg1);
1636 if (CallSiteOps.GetMatch(site)) {
1640 if (CallSiteOps.GetMatch(site)) {
1642 // The rule worked. Add it to level 1 cache.
1644 CallSiteOps.AddRule(@this, rule);
1648 // Rule we got back didn't work, try another one
1649 CallSiteOps.ClearMatch(site);
1653 [Obsolete("pregenerated CallSite<T>.Update delegate", true)]
1654 [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters")]
1655 internal static void NoMatchVoid2<T0, T1>(CallSite site, T0 arg0, T1 arg1) {
1656 site._match = false;
1662 [Obsolete("pregenerated CallSite<T>.Update delegate", true)]
1663 internal static void UpdateAndExecuteVoid3<T0, T1, T2>(CallSite site, T0 arg0, T1 arg1, T2 arg2) {
1665 // Declare the locals here upfront. It actually saves JIT stack space.
1667 var @this = (CallSite<Action<CallSite, T0, T1, T2>>)site;
1668 Action<CallSite, T0, T1, T2>[] applicable;
1669 Action<CallSite, T0, T1, T2> rule, originalRule = @this.Target;
1673 // Create matchmaker and its site. We'll need them regardless.
1675 site = CallSiteOps.CreateMatchmaker(@this);
1678 // Level 1 cache lookup
1680 if ((applicable = CallSiteOps.GetRules(@this)) != null) {
1681 for (int i = 0; i < applicable.Length; i++) {
1682 rule = applicable[i];
1688 // if we've already tried it skip it...
1689 if ((object)rule != (object)originalRule) {
1690 @this.Target = rule;
1691 rule(site, arg0, arg1, arg2);
1693 if (CallSiteOps.GetMatch(site)) {
1694 CallSiteOps.UpdateRules(@this, i);
1698 // Rule didn't match, try the next one
1699 CallSiteOps.ClearMatch(site);
1705 // Level 2 cache lookup
1709 // Any applicable rules in level 2 cache?
1712 var cache = CallSiteOps.GetRuleCache(@this);
1714 applicable = cache.GetRules();
1715 for (int i = 0; i < applicable.Length; i++) {
1716 rule = applicable[i];
1721 @this.Target = rule;
1724 rule(site, arg0, arg1, arg2);
1725 if (CallSiteOps.GetMatch(site)) {
1729 if (CallSiteOps.GetMatch(site)) {
1731 // Rule worked. Add it to level 1 cache
1733 CallSiteOps.AddRule(@this, rule);
1734 // and then move it to the front of the L2 cache
1735 CallSiteOps.MoveRule(cache, rule, i);
1739 // Rule didn't match, try the next one
1740 CallSiteOps.ClearMatch(site);
1744 // Miss on Level 0, 1 and 2 caches. Create new rule
1748 var args = new object[] { arg0, arg1, arg2 };
1751 @this.Target = originalRule;
1752 rule = @this.Target = @this.Binder.BindCore(@this, args);
1755 // Execute the rule on the matchmaker site
1759 rule(site, arg0, arg1, arg2);
1760 if (CallSiteOps.GetMatch(site)) {
1764 if (CallSiteOps.GetMatch(site)) {
1766 // The rule worked. Add it to level 1 cache.
1768 CallSiteOps.AddRule(@this, rule);
1772 // Rule we got back didn't work, try another one
1773 CallSiteOps.ClearMatch(site);
1777 [Obsolete("pregenerated CallSite<T>.Update delegate", true)]
1778 [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters")]
1779 internal static void NoMatchVoid3<T0, T1, T2>(CallSite site, T0 arg0, T1 arg1, T2 arg2) {
1780 site._match = false;
1786 [Obsolete("pregenerated CallSite<T>.Update delegate", true)]
1787 internal static void UpdateAndExecuteVoid4<T0, T1, T2, T3>(CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3) {
1789 // Declare the locals here upfront. It actually saves JIT stack space.
1791 var @this = (CallSite<Action<CallSite, T0, T1, T2, T3>>)site;
1792 Action<CallSite, T0, T1, T2, T3>[] applicable;
1793 Action<CallSite, T0, T1, T2, T3> rule, originalRule = @this.Target;
1797 // Create matchmaker and its site. We'll need them regardless.
1799 site = CallSiteOps.CreateMatchmaker(@this);
1802 // Level 1 cache lookup
1804 if ((applicable = CallSiteOps.GetRules(@this)) != null) {
1805 for (int i = 0; i < applicable.Length; i++) {
1806 rule = applicable[i];
1812 // if we've already tried it skip it...
1813 if ((object)rule != (object)originalRule) {
1814 @this.Target = rule;
1815 rule(site, arg0, arg1, arg2, arg3);
1817 if (CallSiteOps.GetMatch(site)) {
1818 CallSiteOps.UpdateRules(@this, i);
1822 // Rule didn't match, try the next one
1823 CallSiteOps.ClearMatch(site);
1829 // Level 2 cache lookup
1833 // Any applicable rules in level 2 cache?
1836 var cache = CallSiteOps.GetRuleCache(@this);
1838 applicable = cache.GetRules();
1839 for (int i = 0; i < applicable.Length; i++) {
1840 rule = applicable[i];
1845 @this.Target = rule;
1848 rule(site, arg0, arg1, arg2, arg3);
1849 if (CallSiteOps.GetMatch(site)) {
1853 if (CallSiteOps.GetMatch(site)) {
1855 // Rule worked. Add it to level 1 cache
1857 CallSiteOps.AddRule(@this, rule);
1858 // and then move it to the front of the L2 cache
1859 CallSiteOps.MoveRule(cache, rule, i);
1863 // Rule didn't match, try the next one
1864 CallSiteOps.ClearMatch(site);
1868 // Miss on Level 0, 1 and 2 caches. Create new rule
1872 var args = new object[] { arg0, arg1, arg2, arg3 };
1875 @this.Target = originalRule;
1876 rule = @this.Target = @this.Binder.BindCore(@this, args);
1879 // Execute the rule on the matchmaker site
1883 rule(site, arg0, arg1, arg2, arg3);
1884 if (CallSiteOps.GetMatch(site)) {
1888 if (CallSiteOps.GetMatch(site)) {
1890 // The rule worked. Add it to level 1 cache.
1892 CallSiteOps.AddRule(@this, rule);
1896 // Rule we got back didn't work, try another one
1897 CallSiteOps.ClearMatch(site);
1901 [Obsolete("pregenerated CallSite<T>.Update delegate", true)]
1902 [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters")]
1903 internal static void NoMatchVoid4<T0, T1, T2, T3>(CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3) {
1904 site._match = false;
1910 [Obsolete("pregenerated CallSite<T>.Update delegate", true)]
1911 internal static void UpdateAndExecuteVoid5<T0, T1, T2, T3, T4>(CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4) {
1913 // Declare the locals here upfront. It actually saves JIT stack space.
1915 var @this = (CallSite<Action<CallSite, T0, T1, T2, T3, T4>>)site;
1916 Action<CallSite, T0, T1, T2, T3, T4>[] applicable;
1917 Action<CallSite, T0, T1, T2, T3, T4> rule, originalRule = @this.Target;
1921 // Create matchmaker and its site. We'll need them regardless.
1923 site = CallSiteOps.CreateMatchmaker(@this);
1926 // Level 1 cache lookup
1928 if ((applicable = CallSiteOps.GetRules(@this)) != null) {
1929 for (int i = 0; i < applicable.Length; i++) {
1930 rule = applicable[i];
1936 // if we've already tried it skip it...
1937 if ((object)rule != (object)originalRule) {
1938 @this.Target = rule;
1939 rule(site, arg0, arg1, arg2, arg3, arg4);
1941 if (CallSiteOps.GetMatch(site)) {
1942 CallSiteOps.UpdateRules(@this, i);
1946 // Rule didn't match, try the next one
1947 CallSiteOps.ClearMatch(site);
1953 // Level 2 cache lookup
1957 // Any applicable rules in level 2 cache?
1960 var cache = CallSiteOps.GetRuleCache(@this);
1962 applicable = cache.GetRules();
1963 for (int i = 0; i < applicable.Length; i++) {
1964 rule = applicable[i];
1969 @this.Target = rule;
1972 rule(site, arg0, arg1, arg2, arg3, arg4);
1973 if (CallSiteOps.GetMatch(site)) {
1977 if (CallSiteOps.GetMatch(site)) {
1979 // Rule worked. Add it to level 1 cache
1981 CallSiteOps.AddRule(@this, rule);
1982 // and then move it to the front of the L2 cache
1983 CallSiteOps.MoveRule(cache, rule, i);
1987 // Rule didn't match, try the next one
1988 CallSiteOps.ClearMatch(site);
1992 // Miss on Level 0, 1 and 2 caches. Create new rule
1996 var args = new object[] { arg0, arg1, arg2, arg3, arg4 };
1999 @this.Target = originalRule;
2000 rule = @this.Target = @this.Binder.BindCore(@this, args);
2003 // Execute the rule on the matchmaker site
2007 rule(site, arg0, arg1, arg2, arg3, arg4);
2008 if (CallSiteOps.GetMatch(site)) {
2012 if (CallSiteOps.GetMatch(site)) {
2014 // The rule worked. Add it to level 1 cache.
2016 CallSiteOps.AddRule(@this, rule);
2020 // Rule we got back didn't work, try another one
2021 CallSiteOps.ClearMatch(site);
2025 [Obsolete("pregenerated CallSite<T>.Update delegate", true)]
2026 [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters")]
2027 internal static void NoMatchVoid5<T0, T1, T2, T3, T4>(CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4) {
2028 site._match = false;
2034 [Obsolete("pregenerated CallSite<T>.Update delegate", true)]
2035 internal static void UpdateAndExecuteVoid6<T0, T1, T2, T3, T4, T5>(CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5) {
2037 // Declare the locals here upfront. It actually saves JIT stack space.
2039 var @this = (CallSite<Action<CallSite, T0, T1, T2, T3, T4, T5>>)site;
2040 Action<CallSite, T0, T1, T2, T3, T4, T5>[] applicable;
2041 Action<CallSite, T0, T1, T2, T3, T4, T5> rule, originalRule = @this.Target;
2045 // Create matchmaker and its site. We'll need them regardless.
2047 site = CallSiteOps.CreateMatchmaker(@this);
2050 // Level 1 cache lookup
2052 if ((applicable = CallSiteOps.GetRules(@this)) != null) {
2053 for (int i = 0; i < applicable.Length; i++) {
2054 rule = applicable[i];
2060 // if we've already tried it skip it...
2061 if ((object)rule != (object)originalRule) {
2062 @this.Target = rule;
2063 rule(site, arg0, arg1, arg2, arg3, arg4, arg5);
2065 if (CallSiteOps.GetMatch(site)) {
2066 CallSiteOps.UpdateRules(@this, i);
2070 // Rule didn't match, try the next one
2071 CallSiteOps.ClearMatch(site);
2077 // Level 2 cache lookup
2081 // Any applicable rules in level 2 cache?
2084 var cache = CallSiteOps.GetRuleCache(@this);
2086 applicable = cache.GetRules();
2087 for (int i = 0; i < applicable.Length; i++) {
2088 rule = applicable[i];
2093 @this.Target = rule;
2096 rule(site, arg0, arg1, arg2, arg3, arg4, arg5);
2097 if (CallSiteOps.GetMatch(site)) {
2101 if (CallSiteOps.GetMatch(site)) {
2103 // Rule worked. Add it to level 1 cache
2105 CallSiteOps.AddRule(@this, rule);
2106 // and then move it to the front of the L2 cache
2107 CallSiteOps.MoveRule(cache, rule, i);
2111 // Rule didn't match, try the next one
2112 CallSiteOps.ClearMatch(site);
2116 // Miss on Level 0, 1 and 2 caches. Create new rule
2120 var args = new object[] { arg0, arg1, arg2, arg3, arg4, arg5 };
2123 @this.Target = originalRule;
2124 rule = @this.Target = @this.Binder.BindCore(@this, args);
2127 // Execute the rule on the matchmaker site
2131 rule(site, arg0, arg1, arg2, arg3, arg4, arg5);
2132 if (CallSiteOps.GetMatch(site)) {
2136 if (CallSiteOps.GetMatch(site)) {
2138 // The rule worked. Add it to level 1 cache.
2140 CallSiteOps.AddRule(@this, rule);
2144 // Rule we got back didn't work, try another one
2145 CallSiteOps.ClearMatch(site);
2149 [Obsolete("pregenerated CallSite<T>.Update delegate", true)]
2150 [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters")]
2151 internal static void NoMatchVoid6<T0, T1, T2, T3, T4, T5>(CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5) {
2152 site._match = false;
2158 [Obsolete("pregenerated CallSite<T>.Update delegate", true)]
2159 internal static void UpdateAndExecuteVoid7<T0, T1, T2, T3, T4, T5, T6>(CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6) {
2161 // Declare the locals here upfront. It actually saves JIT stack space.
2163 var @this = (CallSite<Action<CallSite, T0, T1, T2, T3, T4, T5, T6>>)site;
2164 Action<CallSite, T0, T1, T2, T3, T4, T5, T6>[] applicable;
2165 Action<CallSite, T0, T1, T2, T3, T4, T5, T6> rule, originalRule = @this.Target;
2169 // Create matchmaker and its site. We'll need them regardless.
2171 site = CallSiteOps.CreateMatchmaker(@this);
2174 // Level 1 cache lookup
2176 if ((applicable = CallSiteOps.GetRules(@this)) != null) {
2177 for (int i = 0; i < applicable.Length; i++) {
2178 rule = applicable[i];
2184 // if we've already tried it skip it...
2185 if ((object)rule != (object)originalRule) {
2186 @this.Target = rule;
2187 rule(site, arg0, arg1, arg2, arg3, arg4, arg5, arg6);
2189 if (CallSiteOps.GetMatch(site)) {
2190 CallSiteOps.UpdateRules(@this, i);
2194 // Rule didn't match, try the next one
2195 CallSiteOps.ClearMatch(site);
2201 // Level 2 cache lookup
2205 // Any applicable rules in level 2 cache?
2208 var cache = CallSiteOps.GetRuleCache(@this);
2210 applicable = cache.GetRules();
2211 for (int i = 0; i < applicable.Length; i++) {
2212 rule = applicable[i];
2217 @this.Target = rule;
2220 rule(site, arg0, arg1, arg2, arg3, arg4, arg5, arg6);
2221 if (CallSiteOps.GetMatch(site)) {
2225 if (CallSiteOps.GetMatch(site)) {
2227 // Rule worked. Add it to level 1 cache
2229 CallSiteOps.AddRule(@this, rule);
2230 // and then move it to the front of the L2 cache
2231 CallSiteOps.MoveRule(cache, rule, i);
2235 // Rule didn't match, try the next one
2236 CallSiteOps.ClearMatch(site);
2240 // Miss on Level 0, 1 and 2 caches. Create new rule
2244 var args = new object[] { arg0, arg1, arg2, arg3, arg4, arg5, arg6 };
2247 @this.Target = originalRule;
2248 rule = @this.Target = @this.Binder.BindCore(@this, args);
2251 // Execute the rule on the matchmaker site
2255 rule(site, arg0, arg1, arg2, arg3, arg4, arg5, arg6);
2256 if (CallSiteOps.GetMatch(site)) {
2260 if (CallSiteOps.GetMatch(site)) {
2262 // The rule worked. Add it to level 1 cache.
2264 CallSiteOps.AddRule(@this, rule);
2268 // Rule we got back didn't work, try another one
2269 CallSiteOps.ClearMatch(site);
2273 [Obsolete("pregenerated CallSite<T>.Update delegate", true)]
2274 [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters")]
2275 internal static void NoMatchVoid7<T0, T1, T2, T3, T4, T5, T6>(CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6) {
2276 site._match = false;
2282 [Obsolete("pregenerated CallSite<T>.Update delegate", true)]
2283 internal static void UpdateAndExecuteVoid8<T0, T1, T2, T3, T4, T5, T6, T7>(CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7) {
2285 // Declare the locals here upfront. It actually saves JIT stack space.
2287 var @this = (CallSite<Action<CallSite, T0, T1, T2, T3, T4, T5, T6, T7>>)site;
2288 Action<CallSite, T0, T1, T2, T3, T4, T5, T6, T7>[] applicable;
2289 Action<CallSite, T0, T1, T2, T3, T4, T5, T6, T7> rule, originalRule = @this.Target;
2293 // Create matchmaker and its site. We'll need them regardless.
2295 site = CallSiteOps.CreateMatchmaker(@this);
2298 // Level 1 cache lookup
2300 if ((applicable = CallSiteOps.GetRules(@this)) != null) {
2301 for (int i = 0; i < applicable.Length; i++) {
2302 rule = applicable[i];
2308 // if we've already tried it skip it...
2309 if ((object)rule != (object)originalRule) {
2310 @this.Target = rule;
2311 rule(site, arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7);
2313 if (CallSiteOps.GetMatch(site)) {
2314 CallSiteOps.UpdateRules(@this, i);
2318 // Rule didn't match, try the next one
2319 CallSiteOps.ClearMatch(site);
2325 // Level 2 cache lookup
2329 // Any applicable rules in level 2 cache?
2332 var cache = CallSiteOps.GetRuleCache(@this);
2334 applicable = cache.GetRules();
2335 for (int i = 0; i < applicable.Length; i++) {
2336 rule = applicable[i];
2341 @this.Target = rule;
2344 rule(site, arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7);
2345 if (CallSiteOps.GetMatch(site)) {
2349 if (CallSiteOps.GetMatch(site)) {
2351 // Rule worked. Add it to level 1 cache
2353 CallSiteOps.AddRule(@this, rule);
2354 // and then move it to the front of the L2 cache
2355 CallSiteOps.MoveRule(cache, rule, i);
2359 // Rule didn't match, try the next one
2360 CallSiteOps.ClearMatch(site);
2364 // Miss on Level 0, 1 and 2 caches. Create new rule
2368 var args = new object[] { arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7 };
2371 @this.Target = originalRule;
2372 rule = @this.Target = @this.Binder.BindCore(@this, args);
2375 // Execute the rule on the matchmaker site
2379 rule(site, arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7);
2380 if (CallSiteOps.GetMatch(site)) {
2384 if (CallSiteOps.GetMatch(site)) {
2386 // The rule worked. Add it to level 1 cache.
2388 CallSiteOps.AddRule(@this, rule);
2392 // Rule we got back didn't work, try another one
2393 CallSiteOps.ClearMatch(site);
2397 [Obsolete("pregenerated CallSite<T>.Update delegate", true)]
2398 [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters")]
2399 internal static void NoMatchVoid8<T0, T1, T2, T3, T4, T5, T6, T7>(CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7) {
2400 site._match = false;
2406 [Obsolete("pregenerated CallSite<T>.Update delegate", true)]
2407 internal static void UpdateAndExecuteVoid9<T0, T1, T2, T3, T4, T5, T6, T7, T8>(CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8) {
2409 // Declare the locals here upfront. It actually saves JIT stack space.
2411 var @this = (CallSite<Action<CallSite, T0, T1, T2, T3, T4, T5, T6, T7, T8>>)site;
2412 Action<CallSite, T0, T1, T2, T3, T4, T5, T6, T7, T8>[] applicable;
2413 Action<CallSite, T0, T1, T2, T3, T4, T5, T6, T7, T8> rule, originalRule = @this.Target;
2417 // Create matchmaker and its site. We'll need them regardless.
2419 site = CallSiteOps.CreateMatchmaker(@this);
2422 // Level 1 cache lookup
2424 if ((applicable = CallSiteOps.GetRules(@this)) != null) {
2425 for (int i = 0; i < applicable.Length; i++) {
2426 rule = applicable[i];
2432 // if we've already tried it skip it...
2433 if ((object)rule != (object)originalRule) {
2434 @this.Target = rule;
2435 rule(site, arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
2437 if (CallSiteOps.GetMatch(site)) {
2438 CallSiteOps.UpdateRules(@this, i);
2442 // Rule didn't match, try the next one
2443 CallSiteOps.ClearMatch(site);
2449 // Level 2 cache lookup
2453 // Any applicable rules in level 2 cache?
2456 var cache = CallSiteOps.GetRuleCache(@this);
2458 applicable = cache.GetRules();
2459 for (int i = 0; i < applicable.Length; i++) {
2460 rule = applicable[i];
2465 @this.Target = rule;
2468 rule(site, arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
2469 if (CallSiteOps.GetMatch(site)) {
2473 if (CallSiteOps.GetMatch(site)) {
2475 // Rule worked. Add it to level 1 cache
2477 CallSiteOps.AddRule(@this, rule);
2478 // and then move it to the front of the L2 cache
2479 CallSiteOps.MoveRule(cache, rule, i);
2483 // Rule didn't match, try the next one
2484 CallSiteOps.ClearMatch(site);
2488 // Miss on Level 0, 1 and 2 caches. Create new rule
2492 var args = new object[] { arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8 };
2495 @this.Target = originalRule;
2496 rule = @this.Target = @this.Binder.BindCore(@this, args);
2499 // Execute the rule on the matchmaker site
2503 rule(site, arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
2504 if (CallSiteOps.GetMatch(site)) {
2508 if (CallSiteOps.GetMatch(site)) {
2510 // The rule worked. Add it to level 1 cache.
2512 CallSiteOps.AddRule(@this, rule);
2516 // Rule we got back didn't work, try another one
2517 CallSiteOps.ClearMatch(site);
2521 [Obsolete("pregenerated CallSite<T>.Update delegate", true)]
2522 [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters")]
2523 internal static void NoMatchVoid9<T0, T1, T2, T3, T4, T5, T6, T7, T8>(CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8) {
2524 site._match = false;
2530 [Obsolete("pregenerated CallSite<T>.Update delegate", true)]
2531 internal static void UpdateAndExecuteVoid10<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9>(CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9) {
2533 // Declare the locals here upfront. It actually saves JIT stack space.
2535 var @this = (CallSite<Action<CallSite, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9>>)site;
2536 Action<CallSite, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9>[] applicable;
2537 Action<CallSite, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> rule, originalRule = @this.Target;
2541 // Create matchmaker and its site. We'll need them regardless.
2543 site = CallSiteOps.CreateMatchmaker(@this);
2546 // Level 1 cache lookup
2548 if ((applicable = CallSiteOps.GetRules(@this)) != null) {
2549 for (int i = 0; i < applicable.Length; i++) {
2550 rule = applicable[i];
2556 // if we've already tried it skip it...
2557 if ((object)rule != (object)originalRule) {
2558 @this.Target = rule;
2559 rule(site, arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9);
2561 if (CallSiteOps.GetMatch(site)) {
2562 CallSiteOps.UpdateRules(@this, i);
2566 // Rule didn't match, try the next one
2567 CallSiteOps.ClearMatch(site);
2573 // Level 2 cache lookup
2577 // Any applicable rules in level 2 cache?
2580 var cache = CallSiteOps.GetRuleCache(@this);
2582 applicable = cache.GetRules();
2583 for (int i = 0; i < applicable.Length; i++) {
2584 rule = applicable[i];
2589 @this.Target = rule;
2592 rule(site, arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9);
2593 if (CallSiteOps.GetMatch(site)) {
2597 if (CallSiteOps.GetMatch(site)) {
2599 // Rule worked. Add it to level 1 cache
2601 CallSiteOps.AddRule(@this, rule);
2602 // and then move it to the front of the L2 cache
2603 CallSiteOps.MoveRule(cache, rule, i);
2607 // Rule didn't match, try the next one
2608 CallSiteOps.ClearMatch(site);
2612 // Miss on Level 0, 1 and 2 caches. Create new rule
2616 var args = new object[] { arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9 };
2619 @this.Target = originalRule;
2620 rule = @this.Target = @this.Binder.BindCore(@this, args);
2623 // Execute the rule on the matchmaker site
2627 rule(site, arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9);
2628 if (CallSiteOps.GetMatch(site)) {
2632 if (CallSiteOps.GetMatch(site)) {
2634 // The rule worked. Add it to level 1 cache.
2636 CallSiteOps.AddRule(@this, rule);
2640 // Rule we got back didn't work, try another one
2641 CallSiteOps.ClearMatch(site);
2645 [Obsolete("pregenerated CallSite<T>.Update delegate", true)]
2646 [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters")]
2647 internal static void NoMatchVoid10<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9>(CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9) {
2648 site._match = false;
2654 // *** END GENERATED CODE ***