-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Defer parsing syntax trees when computing frozen partial solutions #72090
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
e27bb84
92e8fdb
39dff43
85ba620
0d03232
e3c6c2f
ae90a86
4ec51f6
ac5b220
6c7fdb7
cbd1e58
4e98024
52a13be
6f7d2a4
9db05f5
a16da4e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -91,7 +91,7 @@ private InProgressState( | |
| Compilation compilationWithoutGeneratedDocuments, | ||
| CompilationTrackerGeneratorInfo generatorInfo, | ||
| Compilation? staleCompilationWithGeneratedDocuments, | ||
| ImmutableList<(ProjectState state, CompilationAndGeneratorDriverTranslationAction action)> pendingTranslationSteps) | ||
| ImmutableList<(ProjectState oldState, CompilationAndGeneratorDriverTranslationAction action)> pendingTranslationSteps) | ||
| : base(isFrozen, | ||
| compilationWithoutGeneratedDocuments, | ||
| generatorInfo) | ||
|
|
@@ -108,7 +108,7 @@ public static InProgressState Create( | |
| Compilation compilationWithoutGeneratedDocuments, | ||
| CompilationTrackerGeneratorInfo generatorInfo, | ||
| Compilation? staleCompilationWithGeneratedDocuments, | ||
| ImmutableList<(ProjectState state, CompilationAndGeneratorDriverTranslationAction action)> pendingTranslationSteps) | ||
| ImmutableList<(ProjectState oldState, CompilationAndGeneratorDriverTranslationAction action)> pendingTranslationSteps) | ||
| { | ||
| Contract.ThrowIfTrue(pendingTranslationSteps is null); | ||
|
|
||
|
|
@@ -166,7 +166,10 @@ private FinalCompilationTrackerState( | |
| : base(isFrozen, compilationWithoutGeneratedDocuments, generatorInfo) | ||
| { | ||
| Contract.ThrowIfNull(finalCompilationWithGeneratedDocuments); | ||
| HasSuccessfullyLoaded = hasSuccessfullyLoaded; | ||
|
|
||
| // As a policy, all partial-state projects are said to have incomplete references, since the | ||
| // state has no guarantees. | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. moved from a different location here, so that we're consistent on what this bit means wrt frozen states. |
||
| HasSuccessfullyLoaded = hasSuccessfullyLoaded && !isFrozen; | ||
CyrusNajmabadi marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| FinalCompilationWithGeneratedDocuments = finalCompilationWithGeneratedDocuments; | ||
| UnrootedSymbolSet = unrootedSymbolSet; | ||
|
|
||
|
|
@@ -205,6 +208,14 @@ public static FinalCompilationTrackerState Create( | |
| unrootedSymbolSet); | ||
| } | ||
|
|
||
| public FinalCompilationTrackerState WithIsFrozen() | ||
| => new(isFrozen: true, | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. fair. i can do that.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. put into: #72111 |
||
| FinalCompilationWithGeneratedDocuments, | ||
| CompilationWithoutGeneratedDocuments, | ||
| HasSuccessfullyLoaded, | ||
| GeneratorInfo, | ||
| UnrootedSymbolSet); | ||
|
|
||
| private static void RecordAssemblySymbols(ProjectId projectId, Compilation compilation, Dictionary<MetadataReference, ProjectId>? metadataReferenceToProjectId) | ||
| { | ||
| RecordSourceOfAssemblySymbol(compilation.Assembly, projectId); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
naming for consistency.