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

Merge 'main' into RefStructInterfaces #72416

Merged

Conversation

AlekseyTs
Copy link
Contributor

No description provided.

ToddGrun and others added 30 commits February 19, 2024 11:17
)

These methods were using an unsized ArrayBuilder to create an ImmutableArray.

Instead, as the size is pre-known in all these methods, we can just use ImmutableArray.CreateBuilder directly.
…vider.GetSymbolsAsync (dotnet#72157)

This method was individually adding items to an ArrayBuilder without it's size configured. Potential issues with the current approach:

1) There could be multiple resizes during the Add calls to get the array to it's final size
2) Very likely the final capacity will exceed the array size, causing an allocation in generating the immutablearray.
3) I was seeing a large number of items in these arrays, causing the array that does get created not to get freed back into the pool.

Instead, if we use the SelectAsArray method, we shouldn't have any extra allocations other than the resultant ImmutableArray.
* Fix rethrowing in nested async catch

* Test await using and foreach
Razor is doing work to consolidate assemblies, and it's necessary to
add a couple more IVTs from the Razor EA assembly. In addition, I'm
removing an IVT for an assembly that no longer exists.
…ice` in `OnInitializedAsync()`.

- Add EA.Xaml reference to MS.CA.LanguageServer
jjonescz and others added 13 commits March 1, 2024 10:39
…t#72313)

Ensure ProjectState modification operations would actually create a modified ProjectState before creating the new ProjectState

When opening Roslyn.sln, I see 32800 ProjectState.AddDocument calls, of which 6700 are sending in an empty array to add. Similarly, I see 6700 ProjectState.RemoveAllDocuments calls, of which 4700 are called on ProjectState instances where the DocumentStates/AdditionalDocumentStates/AnalyzerConfigDocumentStates are all empty.
Boxing of the EntryState enum shows up in the RichCopyTest.CopyPlain test numbers as almost 1% of allocations. This code just needs to map EntryState values to a character for packing.
Lexer.LexDirectiveTrailingTrivia was calling into AddTrivia with a null SyntaxListBuilder, causing allocations. Instead, use a new member for use in that context.
UsingToolNetFrameworkReferenceAssemblies got removed from Arcade a while ago as the SDK supports that natively.
@AlekseyTs
Copy link
Contributor Author

@cston, @jjonescz, @dotnet/roslyn-compiler Need a sign-off for a merge from main

@dotnet-issue-labeler dotnet-issue-labeler bot added the untriaged Issues and PRs which have not yet been triaged by a lead label Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Compilers Feature - RefStructInterfaces 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.