protected Compilation( DependencyAnalyzerBase<NodeFactory> dependencyGraph, NodeFactory nodeFactory, IEnumerable<ICompilationRootProvider> compilationRoots, NameMangler nameMangler, Logger logger) { _dependencyGraph = dependencyGraph; _nodeFactory = nodeFactory; _nameMangler = nameMangler; _logger = logger; _dependencyGraph.ComputeDependencyRoutine += ComputeDependencyNodeDependencies; NodeFactory.AttachToDependencyGraph(_dependencyGraph); // TODO: hacky static field NodeFactory.NameMangler = nameMangler; var rootingService = new RootingServiceProvider(dependencyGraph, nodeFactory); foreach (var rootProvider in compilationRoots) rootProvider.AddCompilationRoots(rootingService); _typeGetTypeMethodThunks = new TypeGetTypeMethodThunkCache(nodeFactory.CompilationModuleGroup.GeneratedAssembly.GetGlobalModuleType()); PInvokeILProvider = new PInvokeILProvider(new PInvokeILEmitterConfiguration(!nodeFactory.CompilationModuleGroup.IsSingleFileCompilation)); _methodILCache = new ILProvider(PInvokeILProvider); }
public ILProvider(PInvokeILProvider pinvokeILProvider) { _pinvokeILProvider = pinvokeILProvider; }