-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Classify pattern-matching temp as long-lived #18756
Merged
+282
−95
Merged
Changes from 4 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
a142267
Classify pattern-matching temp as long-lived
gafter f83d864
Add test demonstrating correct code for spilling pattern termps.
gafter 1e86626
Merge branch 'master' of https://github.com/dotnet/roslyn into master…
gafter ab4f844
Update test to reflect change in status of pattern temps.
gafter 38a4af1
Test generated code for pattern switch (before temp change)
gafter 437f0e8
Add test for precise IL for pattern switch.
gafter File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,11 +32,6 @@ internal enum SynthesizedLocalKind | |
/// </summary> | ||
FrameCache = -5, | ||
|
||
/// <summary> | ||
/// Temp created for pattern matching by type. | ||
/// </summary> | ||
PatternMatchingTemp = -4, | ||
|
||
/// <summary> | ||
/// Temp variable created by the optimizer. | ||
/// </summary> | ||
|
@@ -53,7 +48,9 @@ internal enum SynthesizedLocalKind | |
EmitterTemp = -1, | ||
|
||
/// <summary> | ||
/// The variable is not synthesized (C#, VB). | ||
/// The variable is not synthesized (C#, VB). Note that SynthesizedLocalKind values | ||
/// greater than or equal to this are considered long-lived; | ||
/// see <see cref="SynthesizedLocalKindExtensions.IsLongLived"/>. | ||
/// </summary> | ||
UserDefined = 0, | ||
|
||
|
@@ -206,6 +203,11 @@ internal enum SynthesizedLocalKind | |
/// </summary> | ||
InstrumentationPayload = 34, | ||
|
||
/// <summary> | ||
/// Temp created for pattern matching by type. | ||
/// </summary> | ||
PatternMatchingTemp = 35, | ||
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. I'd remove "Temp" from the name. "Temp" suggests it's temporary, not long lived. |
||
|
||
/// <summary> | ||
/// All values have to be less than or equal to <see cref="MaxValidValueForLocalVariableSerializedToDebugInformation"/> | ||
/// (<see cref="EditAndContinueMethodDebugInformation"/>) | ||
|
This file contains 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
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.
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.
The changes in sequence points suggest there are changes in IL. Seems like no other test covers the difference in IL. It would be good to have one.