Add ReadyToRunSingleAssemblyCompilationModuleGroup based on MultiFileCompilationModuleGroup#6135
Add ReadyToRunSingleAssemblyCompilationModuleGroup based on MultiFileCompilationModuleGroup#6135acmyu wants to merge 3 commits into
Conversation
| @@ -0,0 +1,132 @@ | |||
| // Licensed to the .NET Foundation under one or more agreements. | |||
There was a problem hiding this comment.
This file should probably go to ILCompiler.ReadyToRun assembly/project.
| _compilationModuleSet.Add(context.GeneratedAssembly); | ||
| } | ||
|
|
||
| public sealed override bool ContainsType(TypeDesc type)// |
There was a problem hiding this comment.
Nit: unnecessary // at the end of line? (Also elsewhere in this file.)
|
|
||
| namespace ILCompiler | ||
| { | ||
| public abstract class ReadyToRunMultiFileCompilationModuleGroup : CompilationModuleGroup |
There was a problem hiding this comment.
We were previously using MultiFileCompilationModuleGroup because it gave us the right semantics of not compiling everything in all referenced assemblies (Single file mode in CoreRT means compile everything in the input assembly plus everything in all assemblies we reference into one output binary). "multifile" is a CoreRT concept that we should not bring over to ready-to-run. In ready-to-run, we'll have this mode you're adding support for, which I suggest naming something like ReadyToRunSingleAssemblyCompilationModuleGroup. In the future, we'll want to support multiple assemblies in a single version bubble and may be able to use CompilationModuleGroups for that.
| /// <summary> | ||
| /// Represents a non-leaf multifile compilation group where types contained in the group are always fully expanded. | ||
| /// </summary> | ||
| public class ReadyToRunMultiFileSharedCompilationModuleGroup : ReadyToRunMultiFileCompilationModuleGroup |
There was a problem hiding this comment.
So we'll want these two classes merged down into one, with the overrides from ReadyToRunMultiFileSharedCompilationModuleGroup replacing the base implementations in ReadyToRunMultiFileCompilationModuleGroup
| } | ||
|
|
||
| compilationGroup = new MultiFileSharedCompilationModuleGroup(typeSystemContext, inputModules); | ||
| if (_isReadyToRunCodeGen) |
There was a problem hiding this comment.
Since multi-file is independent from ready-to-run, please pull the ready-to-run piece up out of the if (_multifile) block.
|
This pr will be merged on top of Tomas' changes to fix the error in the tests: trylek#2 |
No description provided.