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

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

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

Definition at line 596 of file UpdateDelegates.cs.

597 {
599 Func<CallSite, T0, T1, T2, T3, T4, T5, T6, T7, TRet> target = callSite.Target;
600 site = callSite.GetMatchmaker();
601 Func<CallSite, T0, T1, T2, T3, T4, T5, T6, T7, TRet>[] rules;
602 Func<CallSite, T0, T1, T2, T3, T4, T5, T6, T7, TRet> func;
603 if ((rules = CallSiteOps.GetRules(callSite)) != null)
604 {
605 for (int i = 0; i < rules.Length; i++)
606 {
607 func = rules[i];
608 if ((object)func != target)
609 {
610 callSite.Target = func;
611 TRet result = func(site, arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7);
612 if (CallSiteOps.GetMatch(site))
613 {
614 CallSiteOps.UpdateRules(callSite, i);
615 callSite.ReleaseMatchmaker(site);
616 return result;
617 }
619 }
620 }
621 }
623 rules = ruleCache.GetRules();
624 for (int j = 0; j < rules.Length; j++)
625 {
626 func = (callSite.Target = rules[j]);
627 try
628 {
629 TRet result = func(site, arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7);
630 if (CallSiteOps.GetMatch(site))
631 {
632 callSite.ReleaseMatchmaker(site);
633 return result;
634 }
635 }
636 finally
637 {
638 if (CallSiteOps.GetMatch(site))
639 {
640 CallSiteOps.AddRule(callSite, func);
641 CallSiteOps.MoveRule(ruleCache, func, j);
642 }
643 }
645 }
646 func = null;
647 object[] args = new object[8] { arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7 };
648 while (true)
649 {
650 callSite.Target = target;
651 func = (callSite.Target = callSite.Binder.BindCore(callSite, args));
652 try
653 {
654 TRet result = func(site, arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7);
655 if (CallSiteOps.GetMatch(site))
656 {
657 callSite.ReleaseMatchmaker(site);
658 return result;
659 }
660 }
661 finally
662 {
663 if (CallSiteOps.GetMatch(site))
664 {
665 CallSiteOps.AddRule(callSite, func);
666 }
667 }
669 }
670 }
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.