protected override DependencyList ComputeNonRelocationBasedDependencies(NodeFactory factory) { DependencyList dependencies = new DependencyList(); if (_dictionaryOwner is TypeDesc type) { // The generic lookup will need to consult the vtable of the owning type to find the // vtable slot where the generic dictionary is placed - report the dependency. dependencies.Add(factory.VTable(type), "Owning type vtable"); } dependencies.Add(factory.GenericDictionaryLayout(_dictionaryOwner), "Layout"); foreach (DependencyNodeCore <NodeFactory> dependency in _lookupSignature.NonRelocDependenciesFromUsage(factory)) { dependencies.Add(new DependencyListEntry(dependency, "GenericLookupResultDependency")); } if (_id == ReadyToRunHelperId.DelegateCtor) { MethodDesc targetMethod = ((DelegateCreationInfo)_target).PossiblyUnresolvedTargetMethod.GetCanonMethodTarget(CanonicalFormKind.Specific); factory.MetadataManager.GetDependenciesDueToDelegateCreation(ref dependencies, factory, targetMethod); } return(dependencies); }
protected override DependencyList ComputeNonRelocationBasedDependencies(NodeFactory factory) { DependencyList dependencies = new DependencyList(); dependencies.Add(factory.GenericDictionaryLayout(_dictionaryOwner), "Layout"); foreach (DependencyNodeCore <NodeFactory> dependency in _lookupSignature.NonRelocDependenciesFromUsage(factory)) { dependencies.Add(new DependencyListEntry(dependency, "GenericLookupResultDependency")); } return(dependencies); }
protected override DependencyList ComputeNonRelocationBasedDependencies(NodeFactory factory) { DependencyList dependencies = new DependencyList(); if (_dictionaryOwner is TypeDesc type) { // The generic lookup will need to consult the vtable of the owning type to find the // vtable slot where the generic dictionary is placed - report the dependency. dependencies.Add(factory.VTable(type), "Owning type vtable"); } dependencies.Add(factory.GenericDictionaryLayout(_dictionaryOwner), "Layout"); foreach (DependencyNodeCore <NodeFactory> dependency in _lookupSignature.NonRelocDependenciesFromUsage(factory)) { dependencies.Add(new DependencyListEntry(dependency, "GenericLookupResultDependency")); } return(dependencies); }
protected override DependencyList ComputeNonRelocationBasedDependencies(NodeFactory factory) { DependencyList dependencies = new DependencyList(); foreach (DependencyNodeCore <NodeFactory> dependency in _lookupSignature.NonRelocDependenciesFromUsage(factory)) { dependencies.Add(new DependencyListEntry(dependency, "GenericLookupResultDependency")); } // Root the template for the type while we're hitting its dictionary cells. In the future, we may // want to control this via type reflectability instead. if (_dictionaryOwner is MethodDesc) { dependencies.Add(factory.NativeLayout.TemplateMethodLayout((MethodDesc)_dictionaryOwner), "Type loader template"); } else { dependencies.Add(factory.NativeLayout.TemplateTypeLayout((TypeDesc)_dictionaryOwner), "Type loader template"); } return(dependencies); }