Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Core / Microsoft / Scripting / Actions / UpdateDelegates.Generated.cs / 1305376 / UpdateDelegates.Generated.cs
/* **************************************************************************** * * Copyright (c) Microsoft Corporation. * * This source code is subject to terms and conditions of the Microsoft Public License. A * copy of the license can be found in the License.html file at the root of this distribution. If * you cannot locate the Microsoft Public License, please send an email to * dlr@microsoft.com. By using this source code in any fashion, you are agreeing to be bound * by the terms of the Microsoft Public License. * * You must not remove this notice, or any other, from this software. * * * ***************************************************************************/ using System.Runtime.CompilerServices; using System.Threading; namespace System.Dynamic { internal static partial class UpdateDelegates { // // WARNING: do not edit these methods here. The real source code lives // in two places: generate_dynsites.py, which generates the methods in // this file, and UpdateDelegates.cs, which dynamically generates // methods like these at run time. If you want to make a change, edit // *both* of those files instead // #region Generated UpdateAndExecute Methods // *** BEGIN GENERATED CODE *** // generated by function: gen_update_targets from: generate_dynsites.py [Obsolete("pregenerated CallSite.Update delegate", true)] internal static TRet UpdateAndExecute0 (CallSite site) { // // Declare the locals here upfront. It actually saves JIT stack space. // var @this = (CallSite >)site; Func [] applicable; Func rule, originalRule = @this.Target; TRet result; // // Create matchmaker and its site. We'll need them regardless. // site = CallSiteOps.CreateMatchmaker(@this); // // Level 1 cache lookup // if ((applicable = CallSiteOps.GetRules(@this)) != null) { for (int i = 0; i < applicable.Length; i++) { rule = applicable[i]; // // Execute the rule // // if we've already tried it skip it... if ((object)rule != (object)originalRule) { @this.Target = rule; result = rule(site); if (CallSiteOps.GetMatch(site)) { CallSiteOps.UpdateRules(@this, i); return result; } // Rule didn't match, try the next one CallSiteOps.ClearMatch(site); } } } // // Level 2 cache lookup // // // Any applicable rules in level 2 cache? // var cache = CallSiteOps.GetRuleCache(@this); applicable = cache.GetRules(); for (int i = 0; i < applicable.Length; i++) { rule = applicable[i]; // // Execute the rule // @this.Target = rule; try { result = rule(site); if (CallSiteOps.GetMatch(site)) { return result; } } finally { if (CallSiteOps.GetMatch(site)) { // // Rule worked. Add it to level 1 cache // CallSiteOps.AddRule(@this, rule); // and then move it to the front of the L2 cache CallSiteOps.MoveRule(cache, rule, i); } } // Rule didn't match, try the next one CallSiteOps.ClearMatch(site); } // // Miss on Level 0, 1 and 2 caches. Create new rule // rule = null; var args = new object[] { }; for (; ; ) { @this.Target = originalRule; rule = @this.Target = @this.Binder.BindCore(@this, args); // // Execute the rule on the matchmaker site // try { result = rule(site); if (CallSiteOps.GetMatch(site)) { return result; } } finally { if (CallSiteOps.GetMatch(site)) { // // The rule worked. Add it to level 1 cache. // CallSiteOps.AddRule(@this, rule); } } // Rule we got back didn't work, try another one CallSiteOps.ClearMatch(site); } } [Obsolete("pregenerated CallSite .Update delegate", true)] [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters")] internal static TRet NoMatch0 (CallSite site) { site._match = false; return default(TRet); } [Obsolete("pregenerated CallSite .Update delegate", true)] internal static TRet UpdateAndExecute1 (CallSite site, T0 arg0) { // // Declare the locals here upfront. It actually saves JIT stack space. // var @this = (CallSite >)site; Func [] applicable; Func rule, originalRule = @this.Target; TRet result; // // Create matchmaker and its site. We'll need them regardless. // site = CallSiteOps.CreateMatchmaker(@this); // // Level 1 cache lookup // if ((applicable = CallSiteOps.GetRules(@this)) != null) { for (int i = 0; i < applicable.Length; i++) { rule = applicable[i]; // // Execute the rule // // if we've already tried it skip it... if ((object)rule != (object)originalRule) { @this.Target = rule; result = rule(site, arg0); if (CallSiteOps.GetMatch(site)) { CallSiteOps.UpdateRules(@this, i); return result; } // Rule didn't match, try the next one CallSiteOps.ClearMatch(site); } } } // // Level 2 cache lookup // // // Any applicable rules in level 2 cache? // var cache = CallSiteOps.GetRuleCache(@this); applicable = cache.GetRules(); for (int i = 0; i < applicable.Length; i++) { rule = applicable[i]; // // Execute the rule // @this.Target = rule; try { result = rule(site, arg0); if (CallSiteOps.GetMatch(site)) { return result; } } finally { if (CallSiteOps.GetMatch(site)) { // // Rule worked. Add it to level 1 cache // CallSiteOps.AddRule(@this, rule); // and then move it to the front of the L2 cache CallSiteOps.MoveRule(cache, rule, i); } } // Rule didn't match, try the next one CallSiteOps.ClearMatch(site); } // // Miss on Level 0, 1 and 2 caches. Create new rule // rule = null; var args = new object[] { arg0 }; for (; ; ) { @this.Target = originalRule; rule = @this.Target = @this.Binder.BindCore(@this, args); // // Execute the rule on the matchmaker site // try { result = rule(site, arg0); if (CallSiteOps.GetMatch(site)) { return result; } } finally { if (CallSiteOps.GetMatch(site)) { // // The rule worked. Add it to level 1 cache. // CallSiteOps.AddRule(@this, rule); } } // Rule we got back didn't work, try another one CallSiteOps.ClearMatch(site); } } [Obsolete("pregenerated CallSite .Update delegate", true)] [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters")] internal static TRet NoMatch1 (CallSite site, T0 arg0) { site._match = false; return default(TRet); } [Obsolete("pregenerated CallSite .Update delegate", true)] internal static TRet UpdateAndExecute2 (CallSite site, T0 arg0, T1 arg1) { // // Declare the locals here upfront. It actually saves JIT stack space. // var @this = (CallSite >)site; Func [] applicable; Func rule, originalRule = @this.Target; TRet result; // // Create matchmaker and its site. We'll need them regardless. // site = CallSiteOps.CreateMatchmaker(@this); // // Level 1 cache lookup // if ((applicable = CallSiteOps.GetRules(@this)) != null) { for (int i = 0; i < applicable.Length; i++) { rule = applicable[i]; // // Execute the rule // // if we've already tried it skip it... if ((object)rule != (object)originalRule) { @this.Target = rule; result = rule(site, arg0, arg1); if (CallSiteOps.GetMatch(site)) { CallSiteOps.UpdateRules(@this, i); return result; } // Rule didn't match, try the next one CallSiteOps.ClearMatch(site); } } } // // Level 2 cache lookup // // // Any applicable rules in level 2 cache? // var cache = CallSiteOps.GetRuleCache(@this); applicable = cache.GetRules(); for (int i = 0; i < applicable.Length; i++) { rule = applicable[i]; // // Execute the rule // @this.Target = rule; try { result = rule(site, arg0, arg1); if (CallSiteOps.GetMatch(site)) { return result; } } finally { if (CallSiteOps.GetMatch(site)) { // // Rule worked. Add it to level 1 cache // CallSiteOps.AddRule(@this, rule); // and then move it to the front of the L2 cache CallSiteOps.MoveRule(cache, rule, i); } } // Rule didn't match, try the next one CallSiteOps.ClearMatch(site); } // // Miss on Level 0, 1 and 2 caches. Create new rule // rule = null; var args = new object[] { arg0, arg1 }; for (; ; ) { @this.Target = originalRule; rule = @this.Target = @this.Binder.BindCore(@this, args); // // Execute the rule on the matchmaker site // try { result = rule(site, arg0, arg1); if (CallSiteOps.GetMatch(site)) { return result; } } finally { if (CallSiteOps.GetMatch(site)) { // // The rule worked. Add it to level 1 cache. // CallSiteOps.AddRule(@this, rule); } } // Rule we got back didn't work, try another one CallSiteOps.ClearMatch(site); } } [Obsolete("pregenerated CallSite .Update delegate", true)] [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters")] internal static TRet NoMatch2 (CallSite site, T0 arg0, T1 arg1) { site._match = false; return default(TRet); } [Obsolete("pregenerated CallSite .Update delegate", true)] internal static TRet UpdateAndExecute3 (CallSite site, T0 arg0, T1 arg1, T2 arg2) { // // Declare the locals here upfront. It actually saves JIT stack space. // var @this = (CallSite >)site; Func [] applicable; Func rule, originalRule = @this.Target; TRet result; // // Create matchmaker and its site. We'll need them regardless. // site = CallSiteOps.CreateMatchmaker(@this); // // Level 1 cache lookup // if ((applicable = CallSiteOps.GetRules(@this)) != null) { for (int i = 0; i < applicable.Length; i++) { rule = applicable[i]; // // Execute the rule // // if we've already tried it skip it... if ((object)rule != (object)originalRule) { @this.Target = rule; result = rule(site, arg0, arg1, arg2); if (CallSiteOps.GetMatch(site)) { CallSiteOps.UpdateRules(@this, i); return result; } // Rule didn't match, try the next one CallSiteOps.ClearMatch(site); } } } // // Level 2 cache lookup // // // Any applicable rules in level 2 cache? // var cache = CallSiteOps.GetRuleCache(@this); applicable = cache.GetRules(); for (int i = 0; i < applicable.Length; i++) { rule = applicable[i]; // // Execute the rule // @this.Target = rule; try { result = rule(site, arg0, arg1, arg2); if (CallSiteOps.GetMatch(site)) { return result; } } finally { if (CallSiteOps.GetMatch(site)) { // // Rule worked. Add it to level 1 cache // CallSiteOps.AddRule(@this, rule); // and then move it to the front of the L2 cache CallSiteOps.MoveRule(cache, rule, i); } } // Rule didn't match, try the next one CallSiteOps.ClearMatch(site); } // // Miss on Level 0, 1 and 2 caches. Create new rule // rule = null; var args = new object[] { arg0, arg1, arg2 }; for (; ; ) { @this.Target = originalRule; rule = @this.Target = @this.Binder.BindCore(@this, args); // // Execute the rule on the matchmaker site // try { result = rule(site, arg0, arg1, arg2); if (CallSiteOps.GetMatch(site)) { return result; } } finally { if (CallSiteOps.GetMatch(site)) { // // The rule worked. Add it to level 1 cache. // CallSiteOps.AddRule(@this, rule); } } // Rule we got back didn't work, try another one CallSiteOps.ClearMatch(site); } } [Obsolete("pregenerated CallSite .Update delegate", true)] [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters")] internal static TRet NoMatch3 (CallSite site, T0 arg0, T1 arg1, T2 arg2) { site._match = false; return default(TRet); } [Obsolete("pregenerated CallSite .Update delegate", true)] internal static TRet UpdateAndExecute4 (CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3) { // // Declare the locals here upfront. It actually saves JIT stack space. // var @this = (CallSite >)site; Func [] applicable; Func rule, originalRule = @this.Target; TRet result; // // Create matchmaker and its site. We'll need them regardless. // site = CallSiteOps.CreateMatchmaker(@this); // // Level 1 cache lookup // if ((applicable = CallSiteOps.GetRules(@this)) != null) { for (int i = 0; i < applicable.Length; i++) { rule = applicable[i]; // // Execute the rule // // if we've already tried it skip it... if ((object)rule != (object)originalRule) { @this.Target = rule; result = rule(site, arg0, arg1, arg2, arg3); if (CallSiteOps.GetMatch(site)) { CallSiteOps.UpdateRules(@this, i); return result; } // Rule didn't match, try the next one CallSiteOps.ClearMatch(site); } } } // // Level 2 cache lookup // // // Any applicable rules in level 2 cache? // var cache = CallSiteOps.GetRuleCache(@this); applicable = cache.GetRules(); for (int i = 0; i < applicable.Length; i++) { rule = applicable[i]; // // Execute the rule // @this.Target = rule; try { result = rule(site, arg0, arg1, arg2, arg3); if (CallSiteOps.GetMatch(site)) { return result; } } finally { if (CallSiteOps.GetMatch(site)) { // // Rule worked. Add it to level 1 cache // CallSiteOps.AddRule(@this, rule); // and then move it to the front of the L2 cache CallSiteOps.MoveRule(cache, rule, i); } } // Rule didn't match, try the next one CallSiteOps.ClearMatch(site); } // // Miss on Level 0, 1 and 2 caches. Create new rule // rule = null; var args = new object[] { arg0, arg1, arg2, arg3 }; for (; ; ) { @this.Target = originalRule; rule = @this.Target = @this.Binder.BindCore(@this, args); // // Execute the rule on the matchmaker site // try { result = rule(site, arg0, arg1, arg2, arg3); if (CallSiteOps.GetMatch(site)) { return result; } } finally { if (CallSiteOps.GetMatch(site)) { // // The rule worked. Add it to level 1 cache. // CallSiteOps.AddRule(@this, rule); } } // Rule we got back didn't work, try another one CallSiteOps.ClearMatch(site); } } [Obsolete("pregenerated CallSite .Update delegate", true)] [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters")] internal static TRet NoMatch4 (CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3) { site._match = false; return default(TRet); } [Obsolete("pregenerated CallSite .Update delegate", true)] internal static TRet UpdateAndExecute5 (CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4) { // // Declare the locals here upfront. It actually saves JIT stack space. // var @this = (CallSite >)site; Func [] applicable; Func rule, originalRule = @this.Target; TRet result; // // Create matchmaker and its site. We'll need them regardless. // site = CallSiteOps.CreateMatchmaker(@this); // // Level 1 cache lookup // if ((applicable = CallSiteOps.GetRules(@this)) != null) { for (int i = 0; i < applicable.Length; i++) { rule = applicable[i]; // // Execute the rule // // if we've already tried it skip it... if ((object)rule != (object)originalRule) { @this.Target = rule; result = rule(site, arg0, arg1, arg2, arg3, arg4); if (CallSiteOps.GetMatch(site)) { CallSiteOps.UpdateRules(@this, i); return result; } // Rule didn't match, try the next one CallSiteOps.ClearMatch(site); } } } // // Level 2 cache lookup // // // Any applicable rules in level 2 cache? // var cache = CallSiteOps.GetRuleCache(@this); applicable = cache.GetRules(); for (int i = 0; i < applicable.Length; i++) { rule = applicable[i]; // // Execute the rule // @this.Target = rule; try { result = rule(site, arg0, arg1, arg2, arg3, arg4); if (CallSiteOps.GetMatch(site)) { return result; } } finally { if (CallSiteOps.GetMatch(site)) { // // Rule worked. Add it to level 1 cache // CallSiteOps.AddRule(@this, rule); // and then move it to the front of the L2 cache CallSiteOps.MoveRule(cache, rule, i); } } // Rule didn't match, try the next one CallSiteOps.ClearMatch(site); } // // Miss on Level 0, 1 and 2 caches. Create new rule // rule = null; var args = new object[] { arg0, arg1, arg2, arg3, arg4 }; for (; ; ) { @this.Target = originalRule; rule = @this.Target = @this.Binder.BindCore(@this, args); // // Execute the rule on the matchmaker site // try { result = rule(site, arg0, arg1, arg2, arg3, arg4); if (CallSiteOps.GetMatch(site)) { return result; } } finally { if (CallSiteOps.GetMatch(site)) { // // The rule worked. Add it to level 1 cache. // CallSiteOps.AddRule(@this, rule); } } // Rule we got back didn't work, try another one CallSiteOps.ClearMatch(site); } } [Obsolete("pregenerated CallSite .Update delegate", true)] [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters")] internal static TRet NoMatch5 (CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4) { site._match = false; return default(TRet); } [Obsolete("pregenerated CallSite .Update delegate", true)] internal static TRet UpdateAndExecute6 (CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5) { // // Declare the locals here upfront. It actually saves JIT stack space. // var @this = (CallSite >)site; Func [] applicable; Func rule, originalRule = @this.Target; TRet result; // // Create matchmaker and its site. We'll need them regardless. // site = CallSiteOps.CreateMatchmaker(@this); // // Level 1 cache lookup // if ((applicable = CallSiteOps.GetRules(@this)) != null) { for (int i = 0; i < applicable.Length; i++) { rule = applicable[i]; // // Execute the rule // // if we've already tried it skip it... if ((object)rule != (object)originalRule) { @this.Target = rule; result = rule(site, arg0, arg1, arg2, arg3, arg4, arg5); if (CallSiteOps.GetMatch(site)) { CallSiteOps.UpdateRules(@this, i); return result; } // Rule didn't match, try the next one CallSiteOps.ClearMatch(site); } } } // // Level 2 cache lookup // // // Any applicable rules in level 2 cache? // var cache = CallSiteOps.GetRuleCache(@this); applicable = cache.GetRules(); for (int i = 0; i < applicable.Length; i++) { rule = applicable[i]; // // Execute the rule // @this.Target = rule; try { result = rule(site, arg0, arg1, arg2, arg3, arg4, arg5); if (CallSiteOps.GetMatch(site)) { return result; } } finally { if (CallSiteOps.GetMatch(site)) { // // Rule worked. Add it to level 1 cache // CallSiteOps.AddRule(@this, rule); // and then move it to the front of the L2 cache CallSiteOps.MoveRule(cache, rule, i); } } // Rule didn't match, try the next one CallSiteOps.ClearMatch(site); } // // Miss on Level 0, 1 and 2 caches. Create new rule // rule = null; var args = new object[] { arg0, arg1, arg2, arg3, arg4, arg5 }; for (; ; ) { @this.Target = originalRule; rule = @this.Target = @this.Binder.BindCore(@this, args); // // Execute the rule on the matchmaker site // try { result = rule(site, arg0, arg1, arg2, arg3, arg4, arg5); if (CallSiteOps.GetMatch(site)) { return result; } } finally { if (CallSiteOps.GetMatch(site)) { // // The rule worked. Add it to level 1 cache. // CallSiteOps.AddRule(@this, rule); } } // Rule we got back didn't work, try another one CallSiteOps.ClearMatch(site); } } [Obsolete("pregenerated CallSite .Update delegate", true)] [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters")] internal static TRet NoMatch6 (CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5) { site._match = false; return default(TRet); } [Obsolete("pregenerated CallSite .Update delegate", true)] internal static TRet UpdateAndExecute7 (CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6) { // // Declare the locals here upfront. It actually saves JIT stack space. // var @this = (CallSite >)site; Func [] applicable; Func rule, originalRule = @this.Target; TRet result; // // Create matchmaker and its site. We'll need them regardless. // site = CallSiteOps.CreateMatchmaker(@this); // // Level 1 cache lookup // if ((applicable = CallSiteOps.GetRules(@this)) != null) { for (int i = 0; i < applicable.Length; i++) { rule = applicable[i]; // // Execute the rule // // if we've already tried it skip it... if ((object)rule != (object)originalRule) { @this.Target = rule; result = rule(site, arg0, arg1, arg2, arg3, arg4, arg5, arg6); if (CallSiteOps.GetMatch(site)) { CallSiteOps.UpdateRules(@this, i); return result; } // Rule didn't match, try the next one CallSiteOps.ClearMatch(site); } } } // // Level 2 cache lookup // // // Any applicable rules in level 2 cache? // var cache = CallSiteOps.GetRuleCache(@this); applicable = cache.GetRules(); for (int i = 0; i < applicable.Length; i++) { rule = applicable[i]; // // Execute the rule // @this.Target = rule; try { result = rule(site, arg0, arg1, arg2, arg3, arg4, arg5, arg6); if (CallSiteOps.GetMatch(site)) { return result; } } finally { if (CallSiteOps.GetMatch(site)) { // // Rule worked. Add it to level 1 cache // CallSiteOps.AddRule(@this, rule); // and then move it to the front of the L2 cache CallSiteOps.MoveRule(cache, rule, i); } } // Rule didn't match, try the next one CallSiteOps.ClearMatch(site); } // // Miss on Level 0, 1 and 2 caches. Create new rule // rule = null; var args = new object[] { arg0, arg1, arg2, arg3, arg4, arg5, arg6 }; for (; ; ) { @this.Target = originalRule; rule = @this.Target = @this.Binder.BindCore(@this, args); // // Execute the rule on the matchmaker site // try { result = rule(site, arg0, arg1, arg2, arg3, arg4, arg5, arg6); if (CallSiteOps.GetMatch(site)) { return result; } } finally { if (CallSiteOps.GetMatch(site)) { // // The rule worked. Add it to level 1 cache. // CallSiteOps.AddRule(@this, rule); } } // Rule we got back didn't work, try another one CallSiteOps.ClearMatch(site); } } [Obsolete("pregenerated CallSite .Update delegate", true)] [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters")] internal static TRet NoMatch7 (CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6) { site._match = false; return default(TRet); } [Obsolete("pregenerated CallSite .Update delegate", true)] internal static TRet UpdateAndExecute8 (CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7) { // // Declare the locals here upfront. It actually saves JIT stack space. // var @this = (CallSite >)site; Func [] applicable; Func rule, originalRule = @this.Target; TRet result; // // Create matchmaker and its site. We'll need them regardless. // site = CallSiteOps.CreateMatchmaker(@this); // // Level 1 cache lookup // if ((applicable = CallSiteOps.GetRules(@this)) != null) { for (int i = 0; i < applicable.Length; i++) { rule = applicable[i]; // // Execute the rule // // if we've already tried it skip it... if ((object)rule != (object)originalRule) { @this.Target = rule; result = rule(site, arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7); if (CallSiteOps.GetMatch(site)) { CallSiteOps.UpdateRules(@this, i); return result; } // Rule didn't match, try the next one CallSiteOps.ClearMatch(site); } } } // // Level 2 cache lookup // // // Any applicable rules in level 2 cache? // var cache = CallSiteOps.GetRuleCache(@this); applicable = cache.GetRules(); for (int i = 0; i < applicable.Length; i++) { rule = applicable[i]; // // Execute the rule // @this.Target = rule; try { result = rule(site, arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7); if (CallSiteOps.GetMatch(site)) { return result; } } finally { if (CallSiteOps.GetMatch(site)) { // // Rule worked. Add it to level 1 cache // CallSiteOps.AddRule(@this, rule); // and then move it to the front of the L2 cache CallSiteOps.MoveRule(cache, rule, i); } } // Rule didn't match, try the next one CallSiteOps.ClearMatch(site); } // // Miss on Level 0, 1 and 2 caches. Create new rule // rule = null; var args = new object[] { arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7 }; for (; ; ) { @this.Target = originalRule; rule = @this.Target = @this.Binder.BindCore(@this, args); // // Execute the rule on the matchmaker site // try { result = rule(site, arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7); if (CallSiteOps.GetMatch(site)) { return result; } } finally { if (CallSiteOps.GetMatch(site)) { // // The rule worked. Add it to level 1 cache. // CallSiteOps.AddRule(@this, rule); } } // Rule we got back didn't work, try another one CallSiteOps.ClearMatch(site); } } [Obsolete("pregenerated CallSite .Update delegate", true)] [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters")] internal static TRet NoMatch8 (CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7) { site._match = false; return default(TRet); } [Obsolete("pregenerated CallSite .Update delegate", true)] internal static TRet UpdateAndExecute9 (CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8) { // // Declare the locals here upfront. It actually saves JIT stack space. // var @this = (CallSite >)site; Func [] applicable; Func rule, originalRule = @this.Target; TRet result; // // Create matchmaker and its site. We'll need them regardless. // site = CallSiteOps.CreateMatchmaker(@this); // // Level 1 cache lookup // if ((applicable = CallSiteOps.GetRules(@this)) != null) { for (int i = 0; i < applicable.Length; i++) { rule = applicable[i]; // // Execute the rule // // if we've already tried it skip it... if ((object)rule != (object)originalRule) { @this.Target = rule; result = rule(site, arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8); if (CallSiteOps.GetMatch(site)) { CallSiteOps.UpdateRules(@this, i); return result; } // Rule didn't match, try the next one CallSiteOps.ClearMatch(site); } } } // // Level 2 cache lookup // // // Any applicable rules in level 2 cache? // var cache = CallSiteOps.GetRuleCache(@this); applicable = cache.GetRules(); for (int i = 0; i < applicable.Length; i++) { rule = applicable[i]; // // Execute the rule // @this.Target = rule; try { result = rule(site, arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8); if (CallSiteOps.GetMatch(site)) { return result; } } finally { if (CallSiteOps.GetMatch(site)) { // // Rule worked. Add it to level 1 cache // CallSiteOps.AddRule(@this, rule); // and then move it to the front of the L2 cache CallSiteOps.MoveRule(cache, rule, i); } } // Rule didn't match, try the next one CallSiteOps.ClearMatch(site); } // // Miss on Level 0, 1 and 2 caches. Create new rule // rule = null; var args = new object[] { arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8 }; for (; ; ) { @this.Target = originalRule; rule = @this.Target = @this.Binder.BindCore(@this, args); // // Execute the rule on the matchmaker site // try { result = rule(site, arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8); if (CallSiteOps.GetMatch(site)) { return result; } } finally { if (CallSiteOps.GetMatch(site)) { // // The rule worked. Add it to level 1 cache. // CallSiteOps.AddRule(@this, rule); } } // Rule we got back didn't work, try another one CallSiteOps.ClearMatch(site); } } [Obsolete("pregenerated CallSite .Update delegate", true)] [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters")] internal static TRet NoMatch9 (CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8) { site._match = false; return default(TRet); } [Obsolete("pregenerated CallSite .Update delegate", true)] internal static TRet UpdateAndExecute10 (CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9) { // // Declare the locals here upfront. It actually saves JIT stack space. // var @this = (CallSite >)site; Func [] applicable; Func rule, originalRule = @this.Target; TRet result; // // Create matchmaker and its site. We'll need them regardless. // site = CallSiteOps.CreateMatchmaker(@this); // // Level 1 cache lookup // if ((applicable = CallSiteOps.GetRules(@this)) != null) { for (int i = 0; i < applicable.Length; i++) { rule = applicable[i]; // // Execute the rule // // if we've already tried it skip it... if ((object)rule != (object)originalRule) { @this.Target = rule; result = rule(site, arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9); if (CallSiteOps.GetMatch(site)) { CallSiteOps.UpdateRules(@this, i); return result; } // Rule didn't match, try the next one CallSiteOps.ClearMatch(site); } } } // // Level 2 cache lookup // // // Any applicable rules in level 2 cache? // var cache = CallSiteOps.GetRuleCache(@this); applicable = cache.GetRules(); for (int i = 0; i < applicable.Length; i++) { rule = applicable[i]; // // Execute the rule // @this.Target = rule; try { result = rule(site, arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9); if (CallSiteOps.GetMatch(site)) { return result; } } finally { if (CallSiteOps.GetMatch(site)) { // // Rule worked. Add it to level 1 cache // CallSiteOps.AddRule(@this, rule); // and then move it to the front of the L2 cache CallSiteOps.MoveRule(cache, rule, i); } } // Rule didn't match, try the next one CallSiteOps.ClearMatch(site); } // // Miss on Level 0, 1 and 2 caches. Create new rule // rule = null; var args = new object[] { arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9 }; for (; ; ) { @this.Target = originalRule; rule = @this.Target = @this.Binder.BindCore(@this, args); // // Execute the rule on the matchmaker site // try { result = rule(site, arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9); if (CallSiteOps.GetMatch(site)) { return result; } } finally { if (CallSiteOps.GetMatch(site)) { // // The rule worked. Add it to level 1 cache. // CallSiteOps.AddRule(@this, rule); } } // Rule we got back didn't work, try another one CallSiteOps.ClearMatch(site); } } [Obsolete("pregenerated CallSite .Update delegate", true)] [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters")] internal static TRet NoMatch10 (CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9) { site._match = false; return default(TRet); } [Obsolete("pregenerated CallSite .Update delegate", true)] internal static void UpdateAndExecuteVoid1 (CallSite site, T0 arg0) { // // Declare the locals here upfront. It actually saves JIT stack space. // var @this = (CallSite >)site; Action [] applicable; Action rule, originalRule = @this.Target; // // Create matchmaker and its site. We'll need them regardless. // site = CallSiteOps.CreateMatchmaker(@this); // // Level 1 cache lookup // if ((applicable = CallSiteOps.GetRules(@this)) != null) { for (int i = 0; i < applicable.Length; i++) { rule = applicable[i]; // // Execute the rule // // if we've already tried it skip it... if ((object)rule != (object)originalRule) { @this.Target = rule; rule(site, arg0); if (CallSiteOps.GetMatch(site)) { CallSiteOps.UpdateRules(@this, i); return; } // Rule didn't match, try the next one CallSiteOps.ClearMatch(site); } } } // // Level 2 cache lookup // // // Any applicable rules in level 2 cache? // var cache = CallSiteOps.GetRuleCache(@this); applicable = cache.GetRules(); for (int i = 0; i < applicable.Length; i++) { rule = applicable[i]; // // Execute the rule // @this.Target = rule; try { rule(site, arg0); if (CallSiteOps.GetMatch(site)) { return; } } finally { if (CallSiteOps.GetMatch(site)) { // // Rule worked. Add it to level 1 cache // CallSiteOps.AddRule(@this, rule); // and then move it to the front of the L2 cache CallSiteOps.MoveRule(cache, rule, i); } } // Rule didn't match, try the next one CallSiteOps.ClearMatch(site); } // // Miss on Level 0, 1 and 2 caches. Create new rule // rule = null; var args = new object[] { arg0 }; for (; ; ) { @this.Target = originalRule; rule = @this.Target = @this.Binder.BindCore(@this, args); // // Execute the rule on the matchmaker site // try { rule(site, arg0); if (CallSiteOps.GetMatch(site)) { return; } } finally { if (CallSiteOps.GetMatch(site)) { // // The rule worked. Add it to level 1 cache. // CallSiteOps.AddRule(@this, rule); } } // Rule we got back didn't work, try another one CallSiteOps.ClearMatch(site); } } [Obsolete("pregenerated CallSite .Update delegate", true)] [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters")] internal static void NoMatchVoid1 (CallSite site, T0 arg0) { site._match = false; return; } [Obsolete("pregenerated CallSite .Update delegate", true)] internal static void UpdateAndExecuteVoid2 (CallSite site, T0 arg0, T1 arg1) { // // Declare the locals here upfront. It actually saves JIT stack space. // var @this = (CallSite >)site; Action [] applicable; Action rule, originalRule = @this.Target; // // Create matchmaker and its site. We'll need them regardless. // site = CallSiteOps.CreateMatchmaker(@this); // // Level 1 cache lookup // if ((applicable = CallSiteOps.GetRules(@this)) != null) { for (int i = 0; i < applicable.Length; i++) { rule = applicable[i]; // // Execute the rule // // if we've already tried it skip it... if ((object)rule != (object)originalRule) { @this.Target = rule; rule(site, arg0, arg1); if (CallSiteOps.GetMatch(site)) { CallSiteOps.UpdateRules(@this, i); return; } // Rule didn't match, try the next one CallSiteOps.ClearMatch(site); } } } // // Level 2 cache lookup // // // Any applicable rules in level 2 cache? // var cache = CallSiteOps.GetRuleCache(@this); applicable = cache.GetRules(); for (int i = 0; i < applicable.Length; i++) { rule = applicable[i]; // // Execute the rule // @this.Target = rule; try { rule(site, arg0, arg1); if (CallSiteOps.GetMatch(site)) { return; } } finally { if (CallSiteOps.GetMatch(site)) { // // Rule worked. Add it to level 1 cache // CallSiteOps.AddRule(@this, rule); // and then move it to the front of the L2 cache CallSiteOps.MoveRule(cache, rule, i); } } // Rule didn't match, try the next one CallSiteOps.ClearMatch(site); } // // Miss on Level 0, 1 and 2 caches. Create new rule // rule = null; var args = new object[] { arg0, arg1 }; for (; ; ) { @this.Target = originalRule; rule = @this.Target = @this.Binder.BindCore(@this, args); // // Execute the rule on the matchmaker site // try { rule(site, arg0, arg1); if (CallSiteOps.GetMatch(site)) { return; } } finally { if (CallSiteOps.GetMatch(site)) { // // The rule worked. Add it to level 1 cache. // CallSiteOps.AddRule(@this, rule); } } // Rule we got back didn't work, try another one CallSiteOps.ClearMatch(site); } } [Obsolete("pregenerated CallSite .Update delegate", true)] [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters")] internal static void NoMatchVoid2 (CallSite site, T0 arg0, T1 arg1) { site._match = false; return; } [Obsolete("pregenerated CallSite .Update delegate", true)] internal static void UpdateAndExecuteVoid3 (CallSite site, T0 arg0, T1 arg1, T2 arg2) { // // Declare the locals here upfront. It actually saves JIT stack space. // var @this = (CallSite >)site; Action [] applicable; Action rule, originalRule = @this.Target; // // Create matchmaker and its site. We'll need them regardless. // site = CallSiteOps.CreateMatchmaker(@this); // // Level 1 cache lookup // if ((applicable = CallSiteOps.GetRules(@this)) != null) { for (int i = 0; i < applicable.Length; i++) { rule = applicable[i]; // // Execute the rule // // if we've already tried it skip it... if ((object)rule != (object)originalRule) { @this.Target = rule; rule(site, arg0, arg1, arg2); if (CallSiteOps.GetMatch(site)) { CallSiteOps.UpdateRules(@this, i); return; } // Rule didn't match, try the next one CallSiteOps.ClearMatch(site); } } } // // Level 2 cache lookup // // // Any applicable rules in level 2 cache? // var cache = CallSiteOps.GetRuleCache(@this); applicable = cache.GetRules(); for (int i = 0; i < applicable.Length; i++) { rule = applicable[i]; // // Execute the rule // @this.Target = rule; try { rule(site, arg0, arg1, arg2); if (CallSiteOps.GetMatch(site)) { return; } } finally { if (CallSiteOps.GetMatch(site)) { // // Rule worked. Add it to level 1 cache // CallSiteOps.AddRule(@this, rule); // and then move it to the front of the L2 cache CallSiteOps.MoveRule(cache, rule, i); } } // Rule didn't match, try the next one CallSiteOps.ClearMatch(site); } // // Miss on Level 0, 1 and 2 caches. Create new rule // rule = null; var args = new object[] { arg0, arg1, arg2 }; for (; ; ) { @this.Target = originalRule; rule = @this.Target = @this.Binder.BindCore(@this, args); // // Execute the rule on the matchmaker site // try { rule(site, arg0, arg1, arg2); if (CallSiteOps.GetMatch(site)) { return; } } finally { if (CallSiteOps.GetMatch(site)) { // // The rule worked. Add it to level 1 cache. // CallSiteOps.AddRule(@this, rule); } } // Rule we got back didn't work, try another one CallSiteOps.ClearMatch(site); } } [Obsolete("pregenerated CallSite .Update delegate", true)] [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters")] internal static void NoMatchVoid3 (CallSite site, T0 arg0, T1 arg1, T2 arg2) { site._match = false; return; } [Obsolete("pregenerated CallSite .Update delegate", true)] internal static void UpdateAndExecuteVoid4 (CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3) { // // Declare the locals here upfront. It actually saves JIT stack space. // var @this = (CallSite >)site; Action [] applicable; Action rule, originalRule = @this.Target; // // Create matchmaker and its site. We'll need them regardless. // site = CallSiteOps.CreateMatchmaker(@this); // // Level 1 cache lookup // if ((applicable = CallSiteOps.GetRules(@this)) != null) { for (int i = 0; i < applicable.Length; i++) { rule = applicable[i]; // // Execute the rule // // if we've already tried it skip it... if ((object)rule != (object)originalRule) { @this.Target = rule; rule(site, arg0, arg1, arg2, arg3); if (CallSiteOps.GetMatch(site)) { CallSiteOps.UpdateRules(@this, i); return; } // Rule didn't match, try the next one CallSiteOps.ClearMatch(site); } } } // // Level 2 cache lookup // // // Any applicable rules in level 2 cache? // var cache = CallSiteOps.GetRuleCache(@this); applicable = cache.GetRules(); for (int i = 0; i < applicable.Length; i++) { rule = applicable[i]; // // Execute the rule // @this.Target = rule; try { rule(site, arg0, arg1, arg2, arg3); if (CallSiteOps.GetMatch(site)) { return; } } finally { if (CallSiteOps.GetMatch(site)) { // // Rule worked. Add it to level 1 cache // CallSiteOps.AddRule(@this, rule); // and then move it to the front of the L2 cache CallSiteOps.MoveRule(cache, rule, i); } } // Rule didn't match, try the next one CallSiteOps.ClearMatch(site); } // // Miss on Level 0, 1 and 2 caches. Create new rule // rule = null; var args = new object[] { arg0, arg1, arg2, arg3 }; for (; ; ) { @this.Target = originalRule; rule = @this.Target = @this.Binder.BindCore(@this, args); // // Execute the rule on the matchmaker site // try { rule(site, arg0, arg1, arg2, arg3); if (CallSiteOps.GetMatch(site)) { return; } } finally { if (CallSiteOps.GetMatch(site)) { // // The rule worked. Add it to level 1 cache. // CallSiteOps.AddRule(@this, rule); } } // Rule we got back didn't work, try another one CallSiteOps.ClearMatch(site); } } [Obsolete("pregenerated CallSite .Update delegate", true)] [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters")] internal static void NoMatchVoid4 (CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3) { site._match = false; return; } [Obsolete("pregenerated CallSite .Update delegate", true)] internal static void UpdateAndExecuteVoid5 (CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4) { // // Declare the locals here upfront. It actually saves JIT stack space. // var @this = (CallSite >)site; Action [] applicable; Action rule, originalRule = @this.Target; // // Create matchmaker and its site. We'll need them regardless. // site = CallSiteOps.CreateMatchmaker(@this); // // Level 1 cache lookup // if ((applicable = CallSiteOps.GetRules(@this)) != null) { for (int i = 0; i < applicable.Length; i++) { rule = applicable[i]; // // Execute the rule // // if we've already tried it skip it... if ((object)rule != (object)originalRule) { @this.Target = rule; rule(site, arg0, arg1, arg2, arg3, arg4); if (CallSiteOps.GetMatch(site)) { CallSiteOps.UpdateRules(@this, i); return; } // Rule didn't match, try the next one CallSiteOps.ClearMatch(site); } } } // // Level 2 cache lookup // // // Any applicable rules in level 2 cache? // var cache = CallSiteOps.GetRuleCache(@this); applicable = cache.GetRules(); for (int i = 0; i < applicable.Length; i++) { rule = applicable[i]; // // Execute the rule // @this.Target = rule; try { rule(site, arg0, arg1, arg2, arg3, arg4); if (CallSiteOps.GetMatch(site)) { return; } } finally { if (CallSiteOps.GetMatch(site)) { // // Rule worked. Add it to level 1 cache // CallSiteOps.AddRule(@this, rule); // and then move it to the front of the L2 cache CallSiteOps.MoveRule(cache, rule, i); } } // Rule didn't match, try the next one CallSiteOps.ClearMatch(site); } // // Miss on Level 0, 1 and 2 caches. Create new rule // rule = null; var args = new object[] { arg0, arg1, arg2, arg3, arg4 }; for (; ; ) { @this.Target = originalRule; rule = @this.Target = @this.Binder.BindCore(@this, args); // // Execute the rule on the matchmaker site // try { rule(site, arg0, arg1, arg2, arg3, arg4); if (CallSiteOps.GetMatch(site)) { return; } } finally { if (CallSiteOps.GetMatch(site)) { // // The rule worked. Add it to level 1 cache. // CallSiteOps.AddRule(@this, rule); } } // Rule we got back didn't work, try another one CallSiteOps.ClearMatch(site); } } [Obsolete("pregenerated CallSite .Update delegate", true)] [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters")] internal static void NoMatchVoid5 (CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4) { site._match = false; return; } [Obsolete("pregenerated CallSite .Update delegate", true)] internal static void UpdateAndExecuteVoid6 (CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5) { // // Declare the locals here upfront. It actually saves JIT stack space. // var @this = (CallSite >)site; Action [] applicable; Action rule, originalRule = @this.Target; // // Create matchmaker and its site. We'll need them regardless. // site = CallSiteOps.CreateMatchmaker(@this); // // Level 1 cache lookup // if ((applicable = CallSiteOps.GetRules(@this)) != null) { for (int i = 0; i < applicable.Length; i++) { rule = applicable[i]; // // Execute the rule // // if we've already tried it skip it... if ((object)rule != (object)originalRule) { @this.Target = rule; rule(site, arg0, arg1, arg2, arg3, arg4, arg5); if (CallSiteOps.GetMatch(site)) { CallSiteOps.UpdateRules(@this, i); return; } // Rule didn't match, try the next one CallSiteOps.ClearMatch(site); } } } // // Level 2 cache lookup // // // Any applicable rules in level 2 cache? // var cache = CallSiteOps.GetRuleCache(@this); applicable = cache.GetRules(); for (int i = 0; i < applicable.Length; i++) { rule = applicable[i]; // // Execute the rule // @this.Target = rule; try { rule(site, arg0, arg1, arg2, arg3, arg4, arg5); if (CallSiteOps.GetMatch(site)) { return; } } finally { if (CallSiteOps.GetMatch(site)) { // // Rule worked. Add it to level 1 cache // CallSiteOps.AddRule(@this, rule); // and then move it to the front of the L2 cache CallSiteOps.MoveRule(cache, rule, i); } } // Rule didn't match, try the next one CallSiteOps.ClearMatch(site); } // // Miss on Level 0, 1 and 2 caches. Create new rule // rule = null; var args = new object[] { arg0, arg1, arg2, arg3, arg4, arg5 }; for (; ; ) { @this.Target = originalRule; rule = @this.Target = @this.Binder.BindCore(@this, args); // // Execute the rule on the matchmaker site // try { rule(site, arg0, arg1, arg2, arg3, arg4, arg5); if (CallSiteOps.GetMatch(site)) { return; } } finally { if (CallSiteOps.GetMatch(site)) { // // The rule worked. Add it to level 1 cache. // CallSiteOps.AddRule(@this, rule); } } // Rule we got back didn't work, try another one CallSiteOps.ClearMatch(site); } } [Obsolete("pregenerated CallSite .Update delegate", true)] [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters")] internal static void NoMatchVoid6 (CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5) { site._match = false; return; } [Obsolete("pregenerated CallSite .Update delegate", true)] internal static void UpdateAndExecuteVoid7 (CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6) { // // Declare the locals here upfront. It actually saves JIT stack space. // var @this = (CallSite >)site; Action [] applicable; Action rule, originalRule = @this.Target; // // Create matchmaker and its site. We'll need them regardless. // site = CallSiteOps.CreateMatchmaker(@this); // // Level 1 cache lookup // if ((applicable = CallSiteOps.GetRules(@this)) != null) { for (int i = 0; i < applicable.Length; i++) { rule = applicable[i]; // // Execute the rule // // if we've already tried it skip it... if ((object)rule != (object)originalRule) { @this.Target = rule; rule(site, arg0, arg1, arg2, arg3, arg4, arg5, arg6); if (CallSiteOps.GetMatch(site)) { CallSiteOps.UpdateRules(@this, i); return; } // Rule didn't match, try the next one CallSiteOps.ClearMatch(site); } } } // // Level 2 cache lookup // // // Any applicable rules in level 2 cache? // var cache = CallSiteOps.GetRuleCache(@this); applicable = cache.GetRules(); for (int i = 0; i < applicable.Length; i++) { rule = applicable[i]; // // Execute the rule // @this.Target = rule; try { rule(site, arg0, arg1, arg2, arg3, arg4, arg5, arg6); if (CallSiteOps.GetMatch(site)) { return; } } finally { if (CallSiteOps.GetMatch(site)) { // // Rule worked. Add it to level 1 cache // CallSiteOps.AddRule(@this, rule); // and then move it to the front of the L2 cache CallSiteOps.MoveRule(cache, rule, i); } } // Rule didn't match, try the next one CallSiteOps.ClearMatch(site); } // // Miss on Level 0, 1 and 2 caches. Create new rule // rule = null; var args = new object[] { arg0, arg1, arg2, arg3, arg4, arg5, arg6 }; for (; ; ) { @this.Target = originalRule; rule = @this.Target = @this.Binder.BindCore(@this, args); // // Execute the rule on the matchmaker site // try { rule(site, arg0, arg1, arg2, arg3, arg4, arg5, arg6); if (CallSiteOps.GetMatch(site)) { return; } } finally { if (CallSiteOps.GetMatch(site)) { // // The rule worked. Add it to level 1 cache. // CallSiteOps.AddRule(@this, rule); } } // Rule we got back didn't work, try another one CallSiteOps.ClearMatch(site); } } [Obsolete("pregenerated CallSite .Update delegate", true)] [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters")] internal static void NoMatchVoid7 (CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6) { site._match = false; return; } [Obsolete("pregenerated CallSite .Update delegate", true)] internal static void UpdateAndExecuteVoid8 (CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7) { // // Declare the locals here upfront. It actually saves JIT stack space. // var @this = (CallSite >)site; Action [] applicable; Action rule, originalRule = @this.Target; // // Create matchmaker and its site. We'll need them regardless. // site = CallSiteOps.CreateMatchmaker(@this); // // Level 1 cache lookup // if ((applicable = CallSiteOps.GetRules(@this)) != null) { for (int i = 0; i < applicable.Length; i++) { rule = applicable[i]; // // Execute the rule // // if we've already tried it skip it... if ((object)rule != (object)originalRule) { @this.Target = rule; rule(site, arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7); if (CallSiteOps.GetMatch(site)) { CallSiteOps.UpdateRules(@this, i); return; } // Rule didn't match, try the next one CallSiteOps.ClearMatch(site); } } } // // Level 2 cache lookup // // // Any applicable rules in level 2 cache? // var cache = CallSiteOps.GetRuleCache(@this); applicable = cache.GetRules(); for (int i = 0; i < applicable.Length; i++) { rule = applicable[i]; // // Execute the rule // @this.Target = rule; try { rule(site, arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7); if (CallSiteOps.GetMatch(site)) { return; } } finally { if (CallSiteOps.GetMatch(site)) { // // Rule worked. Add it to level 1 cache // CallSiteOps.AddRule(@this, rule); // and then move it to the front of the L2 cache CallSiteOps.MoveRule(cache, rule, i); } } // Rule didn't match, try the next one CallSiteOps.ClearMatch(site); } // // Miss on Level 0, 1 and 2 caches. Create new rule // rule = null; var args = new object[] { arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7 }; for (; ; ) { @this.Target = originalRule; rule = @this.Target = @this.Binder.BindCore(@this, args); // // Execute the rule on the matchmaker site // try { rule(site, arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7); if (CallSiteOps.GetMatch(site)) { return; } } finally { if (CallSiteOps.GetMatch(site)) { // // The rule worked. Add it to level 1 cache. // CallSiteOps.AddRule(@this, rule); } } // Rule we got back didn't work, try another one CallSiteOps.ClearMatch(site); } } [Obsolete("pregenerated CallSite .Update delegate", true)] [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters")] internal static void NoMatchVoid8 (CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7) { site._match = false; return; } [Obsolete("pregenerated CallSite .Update delegate", true)] internal static void UpdateAndExecuteVoid9 (CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8) { // // Declare the locals here upfront. It actually saves JIT stack space. // var @this = (CallSite >)site; Action [] applicable; Action rule, originalRule = @this.Target; // // Create matchmaker and its site. We'll need them regardless. // site = CallSiteOps.CreateMatchmaker(@this); // // Level 1 cache lookup // if ((applicable = CallSiteOps.GetRules(@this)) != null) { for (int i = 0; i < applicable.Length; i++) { rule = applicable[i]; // // Execute the rule // // if we've already tried it skip it... if ((object)rule != (object)originalRule) { @this.Target = rule; rule(site, arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8); if (CallSiteOps.GetMatch(site)) { CallSiteOps.UpdateRules(@this, i); return; } // Rule didn't match, try the next one CallSiteOps.ClearMatch(site); } } } // // Level 2 cache lookup // // // Any applicable rules in level 2 cache? // var cache = CallSiteOps.GetRuleCache(@this); applicable = cache.GetRules(); for (int i = 0; i < applicable.Length; i++) { rule = applicable[i]; // // Execute the rule // @this.Target = rule; try { rule(site, arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8); if (CallSiteOps.GetMatch(site)) { return; } } finally { if (CallSiteOps.GetMatch(site)) { // // Rule worked. Add it to level 1 cache // CallSiteOps.AddRule(@this, rule); // and then move it to the front of the L2 cache CallSiteOps.MoveRule(cache, rule, i); } } // Rule didn't match, try the next one CallSiteOps.ClearMatch(site); } // // Miss on Level 0, 1 and 2 caches. Create new rule // rule = null; var args = new object[] { arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8 }; for (; ; ) { @this.Target = originalRule; rule = @this.Target = @this.Binder.BindCore(@this, args); // // Execute the rule on the matchmaker site // try { rule(site, arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8); if (CallSiteOps.GetMatch(site)) { return; } } finally { if (CallSiteOps.GetMatch(site)) { // // The rule worked. Add it to level 1 cache. // CallSiteOps.AddRule(@this, rule); } } // Rule we got back didn't work, try another one CallSiteOps.ClearMatch(site); } } [Obsolete("pregenerated CallSite .Update delegate", true)] [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters")] internal static void NoMatchVoid9 (CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8) { site._match = false; return; } [Obsolete("pregenerated CallSite .Update delegate", true)] internal static void UpdateAndExecuteVoid10 (CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9) { // // Declare the locals here upfront. It actually saves JIT stack space. // var @this = (CallSite >)site; Action [] applicable; Action rule, originalRule = @this.Target; // // Create matchmaker and its site. We'll need them regardless. // site = CallSiteOps.CreateMatchmaker(@this); // // Level 1 cache lookup // if ((applicable = CallSiteOps.GetRules(@this)) != null) { for (int i = 0; i < applicable.Length; i++) { rule = applicable[i]; // // Execute the rule // // if we've already tried it skip it... if ((object)rule != (object)originalRule) { @this.Target = rule; rule(site, arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9); if (CallSiteOps.GetMatch(site)) { CallSiteOps.UpdateRules(@this, i); return; } // Rule didn't match, try the next one CallSiteOps.ClearMatch(site); } } } // // Level 2 cache lookup // // // Any applicable rules in level 2 cache? // var cache = CallSiteOps.GetRuleCache(@this); applicable = cache.GetRules(); for (int i = 0; i < applicable.Length; i++) { rule = applicable[i]; // // Execute the rule // @this.Target = rule; try { rule(site, arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9); if (CallSiteOps.GetMatch(site)) { return; } } finally { if (CallSiteOps.GetMatch(site)) { // // Rule worked. Add it to level 1 cache // CallSiteOps.AddRule(@this, rule); // and then move it to the front of the L2 cache CallSiteOps.MoveRule(cache, rule, i); } } // Rule didn't match, try the next one CallSiteOps.ClearMatch(site); } // // Miss on Level 0, 1 and 2 caches. Create new rule // rule = null; var args = new object[] { arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9 }; for (; ; ) { @this.Target = originalRule; rule = @this.Target = @this.Binder.BindCore(@this, args); // // Execute the rule on the matchmaker site // try { rule(site, arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9); if (CallSiteOps.GetMatch(site)) { return; } } finally { if (CallSiteOps.GetMatch(site)) { // // The rule worked. Add it to level 1 cache. // CallSiteOps.AddRule(@this, rule); } } // Rule we got back didn't work, try another one CallSiteOps.ClearMatch(site); } } [Obsolete("pregenerated CallSite .Update delegate", true)] [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters")] internal static void NoMatchVoid10 (CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9) { site._match = false; return; } // *** END GENERATED CODE *** #endregion } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- CodeCommentStatement.cs
- RequestCacheManager.cs
- MenuItemBindingCollection.cs
- QilExpression.cs
- Win32Exception.cs
- ListSourceHelper.cs
- MembershipUser.cs
- EntityDataSourceWrapperPropertyDescriptor.cs
- MetadataFile.cs
- BitmapFrameEncode.cs
- StoragePropertyMapping.cs
- SequentialOutput.cs
- DataGridViewRowCancelEventArgs.cs
- Config.cs
- VerifyHashRequest.cs
- ChangeBlockUndoRecord.cs
- _LazyAsyncResult.cs
- OleDbInfoMessageEvent.cs
- ReflectionUtil.cs
- ToolStripItemImageRenderEventArgs.cs
- ToolStripSplitStackLayout.cs
- HyperLinkField.cs
- Button.cs
- UIElementIsland.cs
- BamlLocalizationDictionary.cs
- RuntimeHelpers.cs
- SizeIndependentAnimationStorage.cs
- QueryOutputWriter.cs
- SimpleWebHandlerParser.cs
- PixelFormats.cs
- ModifiableIteratorCollection.cs
- FixedSOMElement.cs
- XsdBuilder.cs
- CalculatedColumn.cs
- SerializationHelper.cs
- TabControlCancelEvent.cs
- TransformCollection.cs
- IntranetCredentialPolicy.cs
- OperationContractAttribute.cs
- CompilationLock.cs
- InputMethodStateChangeEventArgs.cs
- WCFBuildProvider.cs
- HMACMD5.cs
- ChildDocumentBlock.cs
- BitmapEffectCollection.cs
- CharacterBufferReference.cs
- MetadataUtil.cs
- CharacterShapingProperties.cs
- WinInetCache.cs
- PropertyDescriptorComparer.cs
- HandoffBehavior.cs
- FieldMetadata.cs
- BitmapEffectDrawingContent.cs
- ConvertEvent.cs
- HitTestResult.cs
- sqlcontext.cs
- LinkLabelLinkClickedEvent.cs
- AsyncOperationContext.cs
- ButtonRenderer.cs
- GeneralTransform2DTo3DTo2D.cs
- XmlIncludeAttribute.cs
- FloaterBaseParagraph.cs
- GlobalProxySelection.cs
- SmtpFailedRecipientException.cs
- TreeView.cs
- InvalidProgramException.cs
- CredentialCache.cs
- CompensatableTransactionScopeActivityDesigner.cs
- SiteMapHierarchicalDataSourceView.cs
- EnumType.cs
- PeerOutputChannel.cs
- XmlSchemaSimpleContent.cs
- WindowsEditBoxRange.cs
- DbProviderServices.cs
- XMLSchema.cs
- ColumnBinding.cs
- TerminateDesigner.cs
- WebCategoryAttribute.cs
- UniqueIdentifierService.cs
- ScriptingSectionGroup.cs
- SplineQuaternionKeyFrame.cs
- ChangeProcessor.cs
- ASCIIEncoding.cs
- ClientType.cs
- TemplateControlBuildProvider.cs
- MDIClient.cs
- SqlMetaData.cs
- InstanceDataCollection.cs
- ValuePattern.cs
- SingleObjectCollection.cs
- UriTemplateLiteralQueryValue.cs
- TreeNodeEventArgs.cs
- HTTPNotFoundHandler.cs
- WinEventTracker.cs
- CompositeKey.cs
- ApplicationBuildProvider.cs
- SqlCharStream.cs
- DataObject.cs
- CodeDirectiveCollection.cs
- XmlDataLoader.cs