Пример #1
0
        internal ReadyToRunCodegenCompilation(
            DependencyAnalyzerBase <NodeFactory> dependencyGraph,
            NodeFactory nodeFactory,
            IEnumerable <ICompilationRootProvider> roots,
            ILProvider ilProvider,
            Logger logger,
            DevirtualizationManager devirtualizationManager,
            IEnumerable <string> inputFiles,
            string compositeRootPath,
            InstructionSetSupport instructionSetSupport,
            bool resilient,
            bool generateMapFile,
            bool generateMapCsvFile,
            bool generatePdbFile,
            string pdbPath,
            bool generatePerfMapFile,
            string perfMapPath,
            int parallelism,
            ProfileDataManager profileData,
            ReadyToRunMethodLayoutAlgorithm methodLayoutAlgorithm,
            ReadyToRunFileLayoutAlgorithm fileLayoutAlgorithm,
            int customPESectionAlignment,
            bool verifyTypeAndFieldLayout)
            : base(
                dependencyGraph,
                nodeFactory,
                roots,
                ilProvider,
                devirtualizationManager,
                modulesBeingInstrumented: nodeFactory.CompilationModuleGroup.CompilationModuleSet,
                logger,
                instructionSetSupport)
        {
            _resilient                = resilient;
            _parallelism              = parallelism;
            _generateMapFile          = generateMapFile;
            _generateMapCsvFile       = generateMapCsvFile;
            _generatePdbFile          = generatePdbFile;
            _pdbPath                  = pdbPath;
            _generatePerfMapFile      = generatePerfMapFile;
            _perfMapPath              = perfMapPath;
            _customPESectionAlignment = customPESectionAlignment;
            SymbolNodeFactory         = new ReadyToRunSymbolNodeFactory(nodeFactory, verifyTypeAndFieldLayout);
            _corInfoImpls             = new ConditionalWeakTable <Thread, CorInfoImpl>();
            _inputFiles               = inputFiles;
            _compositeRootPath        = compositeRootPath;
            CompilationModuleGroup    = (ReadyToRunCompilationModuleGroupBase)nodeFactory.CompilationModuleGroup;

            // Generate baseline support specification for InstructionSetSupport. This will prevent usage of the generated
            // code if the runtime environment doesn't support the specified instruction set
            string instructionSetSupportString = ReadyToRunInstructionSetSupportSignature.ToInstructionSetSupportString(instructionSetSupport);
            ReadyToRunInstructionSetSupportSignature instructionSetSupportSig = new ReadyToRunInstructionSetSupportSignature(instructionSetSupportString);

            _dependencyGraph.AddRoot(new Import(NodeFactory.EagerImports, instructionSetSupportSig), "Baseline instruction set support");

            _profileData = profileData;

            _fileLayoutOptimizer = new ReadyToRunFileLayoutOptimizer(methodLayoutAlgorithm, fileLayoutAlgorithm, profileData, _nodeFactory);
        }
        internal ReadyToRunCodegenCompilation(
            DependencyAnalyzerBase <NodeFactory> dependencyGraph,
            NodeFactory nodeFactory,
            IEnumerable <ICompilationRootProvider> roots,
            ILProvider ilProvider,
            Logger logger,
            DevirtualizationManager devirtualizationManager,
            IEnumerable <string> inputFiles,
            InstructionSetSupport instructionSetSupport,
            bool resilient,
            bool generateMapFile,
            int parallelism)
            : base(
                dependencyGraph,
                nodeFactory,
                roots,
                ilProvider,
                devirtualizationManager,
                modulesBeingInstrumented: nodeFactory.CompilationModuleGroup.CompilationModuleSet,
                logger,
                instructionSetSupport)
        {
            _resilient             = resilient;
            _parallelism           = parallelism;
            _generateMapFile       = generateMapFile;
            SymbolNodeFactory      = new ReadyToRunSymbolNodeFactory(nodeFactory);
            _corInfoImpls          = new ConditionalWeakTable <Thread, CorInfoImpl>();
            _inputFiles            = inputFiles;
            CompilationModuleGroup = (ReadyToRunCompilationModuleGroupBase)nodeFactory.CompilationModuleGroup;

            // Generate baseline support specification for InstructionSetSupport. This will prevent usage of the generated
            // code if the runtime environment doesn't support the specified instruction set
            string instructionSetSupportString = ReadyToRunInstructionSetSupportSignature.ToInstructionSetSupportString(instructionSetSupport);
            ReadyToRunInstructionSetSupportSignature instructionSetSupportSig = new ReadyToRunInstructionSetSupportSignature(instructionSetSupportString);

            _dependencyGraph.AddRoot(new Import(NodeFactory.EagerImports, instructionSetSupportSig), "Baseline instruction set support");
        }
Пример #3
0
        public ISymbolNode PerMethodInstructionSetSupportFixup(InstructionSetSupport instructionSetSupport)
        {
            string key = ReadyToRunInstructionSetSupportSignature.ToInstructionSetSupportString(instructionSetSupport);

            return(_instructionSetSupportFixups.GetOrAdd(key));
        }