-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Avoid creating result temp for is-expressions (follow-up) #72273
Conversation
@alrz How was the first commit in this PR created? |
Could you please instead replace it with revert of revert of the original merged PR? I am referring to #68694 and to #69582 that followed. |
Done. Let me know if the rest should be squashed if you intend to keep the revert in the merge. |
Thanks!
No. We will squash while merging this PR |
Sure, thought you wanted to do that separately. btw I made the rebase branch to rebase the rest of commits but ended up using |
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.
LGTM (commit 9), assuming CI is passing
@jcouv, @dotnet/roslyn-compiler For the second review. |
@jcouv, @dotnet/roslyn-compiler For the second review. |
EmitCondExpr(sequence.Value, sense: sense); | ||
} | ||
else | ||
{ |
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.
Can we assert that sense == true
in this branch?
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.
Added an assertion to the same effect.
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.
We can get into the alternative branch with !used
and a boolean type. The added assertion doesn't cover sense
in that scenario.
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.
Done with review pass (iteration 9). Only one minor question/suggestion
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.
LGTM (commit 12)
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.
Done with review pass (iteration 12). Still just a nit on assertion
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.
LGTM Thanks (iteration 13)
@alrz Thanks for the contribution |
This reverts commit 00c20fc.
…dotnet#72827) This reverts commit 00c20fc.
* upstream/main: (416 commits) Semantic search (dotnet#71268) Make more static Fix MEF import of IExternalCSharpCopilotCodeAnalysisService to allow null Make static Make private Add comments Add method name to TimeInQueue telemetry (dotnet#72841) switch to frozen Simplify Add test Downstream Use singular helper when creating checksumsw Use singular helper when creating checksumsw Remove ability for a project to change its language Revert "Avoid creating result temp for is-expressions (dotnet#72273)" (dotnet#72827) Localized file check-in by OneLocBuild Task: Build definition ID 327: Build ID 2420199 Localized file check-in by OneLocBuild Task: Build definition ID 327: Build ID 2420199 Localized file check-in by OneLocBuild Task: Build definition ID 327: Build ID 2420199 Localized file check-in by OneLocBuild Task: Build definition ID 327: Build ID 2420199 Improve generic type argument list error recovery (dotnet#69734) ...
Follow-up to #68694 including a possible fix for #69615 at 9ed6e9d.
In the repro, I traced the difference between iterating over
List<T>
andImmutableArray<T>
where the former works correctly and the enumerator is captured in a field. ForList<T>
the loop is wrapped in a try-finally where the state is modified afterwards. Looking back at the VisitLoweredIsPatternExpression I noticed this could be a possible missing piece.Closes #59615
Closes #55334