@@ -109,24 +109,21 @@ public void ProcessType (TypeDefinition definition)
109109 RecordTargetTypeSeen ( definition , _unmarkedExternalTypeMapEntries , _referencedExternalTypeMaps , _pendingExternalTypeMapEntries ) ;
110110 }
111111
112- void RecordTargetTypeSeen ( TypeDefinition definition , Dictionary < TypeDefinition , Dictionary < TypeReference , List < CustomAttributeWithOrigin > > > unmarked , HashSet < TypeReference > referenced , Dictionary < TypeReference , List < CustomAttributeWithOrigin > > pending )
112+ void RecordTargetTypeSeen ( TypeDefinition targetType , Dictionary < TypeDefinition , Dictionary < TypeReference , List < CustomAttributeWithOrigin > > > unmarkedTypeMapAttributes , HashSet < TypeReference > referenceTypeMapGroups , Dictionary < TypeReference , List < CustomAttributeWithOrigin > > typeMapAttributesPendingUniverseMarking )
113113 {
114- if ( unmarked . Remove ( definition , out Dictionary < TypeReference , List < CustomAttributeWithOrigin > > ? entries ) ) {
115- foreach ( var ( key , attributes ) in entries ) {
114+ if ( unmarkedTypeMapAttributes . Remove ( targetType , out Dictionary < TypeReference , List < CustomAttributeWithOrigin > > ? entries ) ) {
115+ foreach ( var ( typeMapGroup , attributes ) in entries ) {
116116
117- if ( referenced . Contains ( key ) ) {
117+ if ( referenceTypeMapGroups . Contains ( typeMapGroup ) ) {
118118 foreach ( var attr in attributes ) {
119- MarkTypeMapAttribute ( attr , new DependencyInfo ( DependencyKind . TypeMapEntry , definition ) ) ;
119+ MarkTypeMapAttribute ( attr , new DependencyInfo ( DependencyKind . TypeMapEntry , targetType ) ) ;
120120 }
121- }
122-
123- if ( ! pending . TryGetValue ( key , out List < CustomAttributeWithOrigin > ? value ) ) {
124- pending [ key ] = [ .. attributes ] ;
121+ } else if ( ! typeMapAttributesPendingUniverseMarking . TryGetValue ( typeMapGroup , out List < CustomAttributeWithOrigin > ? value ) ) {
122+ typeMapAttributesPendingUniverseMarking [ key ] = [ .. attributes ] ;
125123 } else {
126124 value . AddRange ( attributes ) ;
127125 }
128126 }
129- unmarked . Remove ( definition ) ;
130127 }
131128 }
132129
0 commit comments