You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if(reason.Kind == DependencyKind.AlreadyMarked){
Debug.Assert(Annotations.IsMarked(member));}else{
Annotations.Mark(member, reason);}// possibly do extra workif(CheckProcessed (member))return;// do main work for the member
The AlreadyMarked check is to avoid calling Annotations.Mark twice when a different step marks a member through Annotations, and the CheckProcessed call ensures that most of the work is done only once per marked member. Sometimes there is logic in-between which can get called once for each time the member is marked.
We could avoid the AlreadyMarked check by splitting up the MarkStep.Mark* methods into variants that do/don't call Annotations.Mark, or by moving the check into Annotations.Mark.
In cases where there is no "extra work" done between Mark and CheckProcessed, we could then combine the Mark/CheckProcessed calls (assuming it is ok to remove the CheckProcessed extensibility point for derived classes).
With the extra tracking introduced by #1768, this would avoid an extra hashset lookup in a few cases.
MarkStep uses logic like this in a few places:
The
AlreadyMarked
check is to avoid calling Annotations.Mark twice when a different step marks a member through Annotations, and theCheckProcessed
call ensures that most of the work is done only once per marked member. Sometimes there is logic in-between which can get called once for each time the member is marked.We could avoid the
AlreadyMarked
check by splitting up the MarkStep.Mark* methods into variants that do/don't call Annotations.Mark, or by moving the check intoAnnotations.Mark
.In cases where there is no "extra work" done between
Mark
andCheckProcessed
, we could then combine theMark/CheckProcessed
calls (assuming it is ok to remove theCheckProcessed
extensibility point for derived classes).With the extra tracking introduced by #1768, this would avoid an extra hashset lookup in a few cases.
See #1768 (comment)
The text was updated successfully, but these errors were encountered: