protected override DependencyList ComputeNonRelocationBasedDependencies(NodeFactory factory) { DependencyList dependencies = _nonRelocationDependencies != null ? new DependencyList(_nonRelocationDependencies) : null; TypeDesc owningType = _method.OwningType; if (factory.PreinitializationManager.HasEagerStaticConstructor(owningType)) { if (dependencies == null) { dependencies = new DependencyList(); } dependencies.Add(factory.EagerCctorIndirection(owningType.GetStaticConstructor()), "Eager .cctor"); } if (_ehInfo != null) { if (dependencies == null) { dependencies = new DependencyList(); } dependencies.Add(_ehInfo, "Exception handling information"); } if (MethodAssociatedDataNode.MethodHasAssociatedData(factory, this)) { dependencies = dependencies ?? new DependencyList(); dependencies.Add(new DependencyListEntry(factory.MethodAssociatedData(this), "Method associated data")); } return(dependencies); }
protected override DependencyList ComputeNonRelocationBasedDependencies(NodeFactory factory) { DependencyList dependencies = null; TypeDesc owningType = _method.OwningType; if (factory.TypeSystemContext.HasEagerStaticConstructor(owningType)) { if (dependencies == null) dependencies = new DependencyList(); dependencies.Add(factory.EagerCctorIndirection(owningType.GetStaticConstructor()), "Eager .cctor"); } if (_ehInfo != null && _ehInfo.Relocs != null) { if (dependencies == null) dependencies = new DependencyList(); foreach (Relocation reloc in _ehInfo.Relocs) { dependencies.Add(reloc.Target, "reloc"); } } if (MethodAssociatedDataNode.MethodHasAssociatedData(factory, this)) { dependencies = dependencies ?? new DependencyList(); dependencies.Add(new DependencyListEntry(factory.MethodAssociatedData(this), "Method associated data")); } CodeBasedDependencyAlgorithm.AddDependenciesDueToMethodCodePresence(ref dependencies, factory, _method); return dependencies; }
public ISymbolNode GetAssociatedDataNode(NodeFactory factory) { if (MethodAssociatedDataNode.MethodHasAssociatedData(factory, this)) return factory.MethodAssociatedData(this); return null; }
public ISymbolNode GetAssociatedDataNode(NodeFactory factory) { if (MethodAssociatedDataNode.MethodHasAssociatedData(factory, this)) { return(factory.MethodAssociatedData(this)); } return(null); }
public override IEnumerable <DependencyListEntry> GetStaticDependencies(NodeFactory factory) { _dependenciesQueried = true; DependencyList dependencies = null; CodeBasedDependencyAlgorithm.AddDependenciesDueToMethodCodePresence(ref dependencies, factory, _method); if (_compilationDiscoveredDependencies != null) { dependencies = dependencies ?? new DependencyList(); dependencies.AddRange(_compilationDiscoveredDependencies); } if (MethodAssociatedDataNode.MethodHasAssociatedData(factory, this)) { dependencies = dependencies ?? new DependencyList(); dependencies.Add(new DependencyListEntry(factory.MethodAssociatedData(this), "Method associated data")); } return(dependencies); }