Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/corert.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Strehovský <MichalStrehovsky@users.noreply.github.com>2017-07-06 23:20:48 +0300
committerGitHub <noreply@github.com>2017-07-06 23:20:48 +0300
commit0842e4ad8006e0552fdbb61add64e626ae353b57 (patch)
tree44732fab53a991e485df7a30758bc45852a65d06 /src/ILCompiler.CppCodeGen
parent9c4aa0d63785ac0668def4b60c90e9dc80846db0 (diff)
Make it possible to provide generic dictionary layout externally (#4085)
...and implement a provider in the ILScanner. This is a prerequisite for getting rid of generic lookup ready to run helpers. * Add a `DictionaryLayoutProvider` class that provides `DictionaryLayoutNode` for a specified type or method. * Expose APIs on compilation builder that let user specify a `DictionaryLayoutProvider` to be used for compilation. * Add an implementation of `DictionaryLayoutProvider` on ILScanner that looks at the marked dictionary layouts in the graph to provide results. * Make nodes that depend on dictionary layout to declare the dependency (so that it properly shows up in the graph) * Add a lazy dictionary layout provider that just simulates the existing behavior of dictionary layouts that cannot be queried about slots until after we're done compiling. * Duplicate dependencies from ReadyToRun generic helpers to dictionary layout/generic dictionaries - these have known dependencies if the slots are known. We'll need them when lookups stop using the ReadyToRun helpers. * Implement Equals/GetHashCode on GenericLookupResult - these are normally interned, but when we reuse GenericLookupResults across scanning/compilation phase, we need to be able to compare them.
Diffstat (limited to 'src/ILCompiler.CppCodeGen')
-rw-r--r--src/ILCompiler.CppCodeGen/src/Compiler/CppCodegenCompilationBuilder.cs2
-rw-r--r--src/ILCompiler.CppCodeGen/src/Compiler/DependencyAnalysis/CppCodegenNodeFactory.cs4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/ILCompiler.CppCodeGen/src/Compiler/CppCodegenCompilationBuilder.cs b/src/ILCompiler.CppCodeGen/src/Compiler/CppCodegenCompilationBuilder.cs
index a9b278d40..fcd5c95cb 100644
--- a/src/ILCompiler.CppCodeGen/src/Compiler/CppCodegenCompilationBuilder.cs
+++ b/src/ILCompiler.CppCodeGen/src/Compiler/CppCodegenCompilationBuilder.cs
@@ -32,7 +32,7 @@ namespace ILCompiler
public override ICompilation ToCompilation()
{
var interopStubManager = new CompilerGeneratedInteropStubManager(_compilationGroup, _context, new InteropStateManager(_compilationGroup.GeneratedAssembly));
- CppCodegenNodeFactory factory = new CppCodegenNodeFactory(_context, _compilationGroup, _metadataManager, interopStubManager, _nameMangler, _vtableSliceProvider);
+ CppCodegenNodeFactory factory = new CppCodegenNodeFactory(_context, _compilationGroup, _metadataManager, interopStubManager, _nameMangler, _vtableSliceProvider, _dictionaryLayoutProvider);
DependencyAnalyzerBase<NodeFactory> graph = CreateDependencyGraph(factory);
return new CppCodegenCompilation(graph, factory, _compilationRoots, _logger, _config);
diff --git a/src/ILCompiler.CppCodeGen/src/Compiler/DependencyAnalysis/CppCodegenNodeFactory.cs b/src/ILCompiler.CppCodeGen/src/Compiler/DependencyAnalysis/CppCodegenNodeFactory.cs
index 0aa579bf7..5ba395683 100644
--- a/src/ILCompiler.CppCodeGen/src/Compiler/DependencyAnalysis/CppCodegenNodeFactory.cs
+++ b/src/ILCompiler.CppCodeGen/src/Compiler/DependencyAnalysis/CppCodegenNodeFactory.cs
@@ -11,8 +11,8 @@ namespace ILCompiler.DependencyAnalysis
public sealed class CppCodegenNodeFactory : NodeFactory
{
public CppCodegenNodeFactory(CompilerTypeSystemContext context, CompilationModuleGroup compilationModuleGroup, MetadataManager metadataManager,
- InteropStubManager interopStubManager, NameMangler nameMangler, VTableSliceProvider vtableSliceProvider)
- : base(context, compilationModuleGroup, metadataManager, interopStubManager, nameMangler, new LazyGenericsDisabledPolicy(), vtableSliceProvider)
+ InteropStubManager interopStubManager, NameMangler nameMangler, VTableSliceProvider vtableSliceProvider, DictionaryLayoutProvider dictionaryLayoutProvider)
+ : base(context, compilationModuleGroup, metadataManager, interopStubManager, nameMangler, new LazyGenericsDisabledPolicy(), vtableSliceProvider, dictionaryLayoutProvider)
{
}