Skip to content
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 unnecessary tail increment in collection expressions codegen #75559

Merged
merged 1 commit into from
Oct 21, 2024

Conversation

DoctorKrolic
Copy link
Contributor

Fixes: #74875

Replacement for #74982 (got some complicated merge conflicts due to the merge of a new feature branch, so I decided that it would be easier to redo this from scratch)

Existing tests cover both array and span code paths in various configurations (just scalar elements or the last scalar after spread), so no new tests are necessary

@DoctorKrolic DoctorKrolic requested a review from a team as a code owner October 18, 2024 16:25
@dotnet-issue-labeler dotnet-issue-labeler bot added Area-Compilers untriaged Issues and PRs which have not yet been triaged by a lead labels Oct 18, 2024
@dotnet-policy-service dotnet-policy-service bot added the Community The pull request was submitted by a contributor who is not a Microsoft employee. label Oct 18, 2024
System.Runtime.CompilerServices.TaskAwaiter<int[]> V_6,
System.Span<int> V_7,
System.Exception V_8)
int V_4,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems like a nice little win. It looks like the local is no longer being lifted into a display class because now it is not used after the await.

@cston cston merged commit 9fdc4ea into dotnet:main Oct 21, 2024
24 checks passed
@dotnet-policy-service dotnet-policy-service bot added this to the Next milestone Oct 21, 2024
@cston
Copy link
Member

cston commented Oct 21, 2024

Thanks @DoctorKrolic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Compilers Community The pull request was submitted by a contributor who is not a Microsoft employee. untriaged Issues and PRs which have not yet been triaged by a lead
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Collection expressions may result in unnecessary tail increment
4 participants