@@ -345,6 +345,9 @@ public void GetDependenciesDueToReflectability(ref DependencyList dependencies,
345
345
346
346
ReflectionInvokeSupportDependencyAlgorithm . GetDependenciesFromParamsArray ( ref dependencies , factory , method ) ;
347
347
}
348
+
349
+ GenericMethodsTemplateMap . GetTemplateMethodDependencies ( ref dependencies , factory , method ) ;
350
+ GenericTypesTemplateMap . GetTemplateTypeDependencies ( ref dependencies , factory , method . OwningType ) ;
348
351
}
349
352
}
350
353
@@ -359,6 +362,12 @@ public void GetDependenciesDueToReflectability(ref DependencyList dependencies,
359
362
{
360
363
GetMetadataDependenciesDueToReflectability ( ref dependencies , factory , field ) ;
361
364
}
365
+
366
+ if ( ( category & MetadataCategory . RuntimeMapping ) != 0 )
367
+ {
368
+ TypeDesc owningCanonicalType = field . OwningType . ConvertToCanonForm ( CanonicalFormKind . Specific ) ;
369
+ GenericTypesTemplateMap . GetTemplateTypeDependencies ( ref dependencies , factory , owningCanonicalType ) ;
370
+ }
362
371
}
363
372
364
373
/// <summary>
@@ -393,8 +402,6 @@ public void GetDependenciesDueToReflectability(ref DependencyList dependencies,
393
402
{
394
403
GetMetadataDependenciesDueToReflectability ( ref dependencies , factory , type ) ;
395
404
}
396
-
397
- GetDependenciesDueToEETypePresence ( ref dependencies , factory , type ) ;
398
405
}
399
406
400
407
protected virtual void GetMetadataDependenciesDueToReflectability ( ref DependencyList dependencies , NodeFactory factory , TypeDesc type )
@@ -404,11 +411,6 @@ protected virtual void GetMetadataDependenciesDueToReflectability(ref Dependency
404
411
// and property setters)
405
412
}
406
413
407
- protected virtual void GetDependenciesDueToEETypePresence ( ref DependencyList dependencies , NodeFactory factory , TypeDesc type )
408
- {
409
- // MetadataManagers can override this to provide additional dependencies caused by the emission of an MethodTable.
410
- }
411
-
412
414
public virtual void GetConditionalDependenciesDueToEETypePresence ( ref CombinedDependencyList dependencies , NodeFactory factory , TypeDesc type )
413
415
{
414
416
// MetadataManagers can override this to provide additional dependencies caused by the presence of
@@ -464,7 +466,6 @@ public void GetDependenciesDueToMethodCodePresence(ref DependencyList dependenci
464
466
ExactMethodInstantiationsNode . GetExactMethodInstantiationDependenciesForMethod ( ref dependencies , factory , method ) ;
465
467
}
466
468
467
- GetDependenciesDueToTemplateTypeLoader ( ref dependencies , factory , method ) ;
468
469
GetDependenciesDueToMethodCodePresenceInternal ( ref dependencies , factory , method , methodIL ) ;
469
470
}
470
471
@@ -480,28 +481,6 @@ public virtual void GetConditionalDependenciesDueToMethodCodePresence(ref Combin
480
481
// method code.
481
482
}
482
483
483
- private void GetDependenciesDueToTemplateTypeLoader ( ref DependencyList dependencies , NodeFactory factory , MethodDesc method )
484
- {
485
- // TODO-SIZE: this is overly generous in the templates we create
486
- if ( _blockingPolicy is FullyBlockedMetadataBlockingPolicy )
487
- return ;
488
-
489
- if ( method . HasInstantiation )
490
- {
491
- GenericMethodsTemplateMap . GetTemplateMethodDependencies ( ref dependencies , factory , method ) ;
492
- }
493
- else
494
- {
495
- TypeDesc owningTemplateType = method . OwningType ;
496
-
497
- // Unboxing and Instantiating stubs use a different type as their template
498
- if ( factory . TypeSystemContext . IsSpecialUnboxingThunk ( method ) )
499
- owningTemplateType = factory . TypeSystemContext . GetTargetOfSpecialUnboxingThunk ( method ) . OwningType ;
500
-
501
- GenericTypesTemplateMap . GetTemplateTypeDependencies ( ref dependencies , factory , owningTemplateType ) ;
502
- }
503
- }
504
-
505
484
protected virtual void GetDependenciesDueToMethodCodePresenceInternal ( ref DependencyList dependencies , NodeFactory factory , MethodDesc method , MethodIL methodIL )
506
485
{
507
486
// MetadataManagers can override this to provide additional dependencies caused by the presence of a
0 commit comments