Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ UpdateAndExecute9< T0, T1, T2, T3, T4, T5, T6, T7, T8, TRet >()

static TRet System.Dynamic.UpdateDelegates.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 )
inlinestaticpackage

Definition at line 680 of file UpdateDelegates.cs.

681 {
683 Func<CallSite, T0, T1, T2, T3, T4, T5, T6, T7, T8, TRet> target = callSite.Target;
684 site = callSite.GetMatchmaker();
685 Func<CallSite, T0, T1, T2, T3, T4, T5, T6, T7, T8, TRet>[] rules;
686 Func<CallSite, T0, T1, T2, T3, T4, T5, T6, T7, T8, TRet> func;
687 if ((rules = CallSiteOps.GetRules(callSite)) != null)
688 {
689 for (int i = 0; i < rules.Length; i++)
690 {
691 func = rules[i];
692 if ((object)func != target)
693 {
694 callSite.Target = func;
695 TRet result = func(site, arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
696 if (CallSiteOps.GetMatch(site))
697 {
698 CallSiteOps.UpdateRules(callSite, i);
699 callSite.ReleaseMatchmaker(site);
700 return result;
701 }
703 }
704 }
705 }
707 rules = ruleCache.GetRules();
708 for (int j = 0; j < rules.Length; j++)
709 {
710 func = (callSite.Target = rules[j]);
711 try
712 {
713 TRet result = func(site, arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
714 if (CallSiteOps.GetMatch(site))
715 {
716 callSite.ReleaseMatchmaker(site);
717 return result;
718 }
719 }
720 finally
721 {
722 if (CallSiteOps.GetMatch(site))
723 {
724 CallSiteOps.AddRule(callSite, func);
725 CallSiteOps.MoveRule(ruleCache, func, j);
726 }
727 }
729 }
730 func = null;
731 object[] args = new object[9] { arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8 };
732 while (true)
733 {
734 callSite.Target = target;
735 func = (callSite.Target = callSite.Binder.BindCore(callSite, args));
736 try
737 {
738 TRet result = func(site, arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
739 if (CallSiteOps.GetMatch(site))
740 {
741 callSite.ReleaseMatchmaker(site);
742 return result;
743 }
744 }
745 finally
746 {
747 if (CallSiteOps.GetMatch(site))
748 {
749 CallSiteOps.AddRule(callSite, func);
750 }
751 }
753 }
754 }
static bool GetMatch(CallSite site)
static void ClearMatch(CallSite site)
void ReleaseMatchmaker(CallSite matchMaker)
Definition CallSite.cs:106

References System.Runtime.CompilerServices.CallSite< T >.Binder, System.Runtime.CompilerServices.CallSiteOps.ClearMatch(), System.Runtime.CompilerServices.CallSiteOps.GetMatch(), System.Runtime.CompilerServices.CallSite< T >.GetMatchmaker(), System.Runtime.CompilerServices.RuleCache< T >.GetRules(), System.Runtime.CompilerServices.CallSite< T >.ReleaseMatchmaker(), and System.Runtime.CompilerServices.CallSite< T >.Target.