Compiler: Small bits of clean up#12200
Merged
DustinCampbell merged 9 commits intodotnet:mainfrom Sep 17, 2025
Merged
Conversation
- Enable nullability - Remove unnecessary argument-null checks. - Declare constant values as consts - Avoid computed properties that allocate new strings - Add method for setting ComponentCaptureTypeName - Simplify logic in ComponentGenericTypePass that updates the ComponentCaptureTypeName. - IntermedateToken property can't ever be null. Fix usages that use a null-conditional operator.
- Mark as sealed - Use pattern matching to simplify DetermineIdentifierToken. - Update RewriteUsage to actually rewrite.
- Remove unnecessary argument-null checks - Declare constant values as consts - Don't declare unused variable for using statements - Use string.Build(...) rather than interpolated string
- Enable nullability - Remove unnecessary argument-null checks. - KeyValueToken property can't ever be null. Fix usages that use a null-conditional operator.
- Remove unnecessary argument-null checks
- Mark as sealed - Use pattern matching to simplify DetermineIdentifierToken. - Update RewriteUsage to actually rewrite.
- Enable nullability - Remove unnecessary argument-null checks.
- Mark as sealed - Update RewriteUsage to actually rewrite.
- Remove unnecessary argument-null checks. - Call CodeWriter.Write(...) once using interpolated string handler. - Use CollectDescendantNodes to avoid allocating array.
davidwengier
approved these changes
Sep 9, 2025
Member
Author
For sure, but not in this PR. I want to do a full clean up of the node writers. |
Member
Author
|
@chsienki, PTAL |
chsienki
approved these changes
Sep 16, 2025
This was referenced Sep 25, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is just a small amount of clean up around a few intermediate nodes.