Граф коммитов

113611 Коммитов

Автор SHA1 Сообщение Дата
David Barbet 697989601c
Merge pull request #75655 from dibarbet/completion_soft_selection_lsp
Ensure discards are initially soft selected in VSCode
2024-10-30 11:22:13 -07:00
Cyrus Najmabadi a26b1445e6
Merge pull request #63378 from Youssef1313/issues/63280
Fix generate type dialog invoked on type argument in a base list
2024-10-30 12:12:42 -05:00
Todd Grunke 308cda3f58
Reduce allocations in VirtualCharService.CreateVirtualCharSequence (#75654)
This method shows up in OOP allocations in the scrolling speedometer test. This method is invoked to create runes for text sequences for strings. The standard case is that there aren't any multi-char runes in a string, in which case AbstractVirtualCharService.CreateVirtualCharSequence doesn't end up using the ImmutableSegmentedList in the result it creates. This means that we can reuse this builder and it's underlying array after it's been cleared out.

This shows up as around 2.0% of allocations in out OOP in the scrolling speedometer test.
2024-10-30 10:01:55 -07:00
Todd Grunke 5ab7f5b48e
Reduce allocations in TextDocumentStates.AddRange (#75640)
This method was calling ImmutableList.AddRange giving it the result of a Select linq expression. The underlying ImmutableList code doesn't end up special casing that collection type, and thus creates a FallbackWrapper around the enumeration. The FallbackWrapper.Count method uses Enumerable.ToArray to cache a collection object, which ends up

1) doing the double resize allocation dance pass until done
2) resizing that final array

This essentially means we've allocated around 3x the amount of memory needed to hold our documentids. Instead, if we use a pooled list, we can generally avoid the allocations completely (the ImmutableList code instead creates a ListOfTWrapper around our List which doesn't need to allocate)

This method is showing up as around 0.8% of allocations in the typing section of the csharp editing speedometer test.
2024-10-30 08:05:18 -07:00
Jan Jones 5d355f603f
Fix ref analysis of self-assignment (#75618)
* Fix ref analysis of self-assignment

* Update tests

* Extend tests

* Add a test variant
2024-10-30 11:49:29 +00:00
tmat 45769e3e63 Fix flow of CompilerGeneratedFilesOutputPath from CPS 2024-10-29 18:43:57 -07:00
David Barbet 76a654b2c2 feedback 2024-10-29 17:52:22 -07:00
Tomáš Matoušek 840bbb66c1
Workaround for binding redirect generation issue (#75653) 2024-10-29 16:33:56 -07:00
AlekseyTs eadb8aee94
Follow up on fixes in runtime (enable execution of affected test scenarios) (#75670)
Closes #61321
Closes #64501
2024-10-29 22:39:19 +00:00
dotnet bot 477a0901fd
Merge pull request #75669 from dotnet/merges/release/dev17.12-to-release/dev17.13
Merge release/dev17.12 to release/dev17.13
2024-10-29 22:02:28 +01:00
David Wengier 07b18eb830
Merge pull request #75659 from davidwengier/BumpRazor
Bump Razor to 9.0.0-preview.24528.3
2024-10-30 07:40:20 +11:00
David Barbet 2f130c87f7 simplify and only check punctuation 2024-10-29 11:29:11 -07:00
Giridhar Trivedi cc9b38e062
Remove redundant IsMono (#75649)
* Remove redundant IsMono

* Address review comments
2024-10-29 09:33:45 +00:00
Jan Jones cc5e8a7e5d
Fix ref safety analysis of captured locals (#75627)
* Fix ref safety analysis of captured locals

* Use the same safer scope as fallback too
2024-10-29 10:17:45 +01:00
Cyrus Najmabadi 110559668b
Merge pull request #75645 from CyrusNajmabadi/useConditionalTopLevel
Fix 'use conditional expression' in top level statements
2024-10-28 20:13:23 -05:00
David Wengier 459db8716f Bump Razor to 9.0.0-preview.24528.3 2024-10-29 12:09:32 +11:00
AlekseyTs 57f05a3c12
Add tests for `unmanaged` constraint (#75629)
Related to #75620.
2024-10-28 18:05:02 -07:00
Ankita Khera 502d0ec737
update configs for 17.13p2 snap (#75650) 2024-10-28 16:13:04 -07:00
David Barbet 4c6be58bd9 Ensure discards are initially soft selected in VSCode 2024-10-28 14:58:05 -07:00
Cyrus Najmabadi b770b61a11
Merge pull request #75644 from CyrusNajmabadi/addAwaitBindingExpressions
Fix crash when 'add await' analyzers binding expressions
2024-10-28 12:20:14 -07:00
Cyrus Najmabadi 2a27803056
Merge pull request #75643 from CyrusNajmabadi/shortNames
Shorten names shown in 'pull member up'
2024-10-28 12:09:52 -07:00
Cyrus Najmabadi dae93211b6
Merge pull request #75642 from CyrusNajmabadi/protectedSigHelp 2024-10-28 12:00:33 -07:00
David Barbet 4c6ff9cbf6
Merge pull request #75615 from dibarbet/dynamic_log_level
Allow the client to update the server logging level dynamically
2024-10-28 10:42:34 -07:00
Youssef Victor 574373044f Update CSharpGenerateTypeService.cs 2024-10-28 16:28:38 +01:00
Youssef1313 c5173d1dbd Fix VB, fix tests 2024-10-28 16:21:17 +01:00
Youssef1313 7bc4305a99 One more test case 2024-10-28 16:21:14 +01:00
Youssef1313 e1a90899f7 Simplify code, add test 2024-10-28 16:19:39 +01:00
Youssef1313 1f68b0e2a2 Fix generate type dialog invoked on type argument in a base list 2024-10-28 16:14:28 +01:00
Cyrus Najmabadi 04a2591885 lint 2024-10-26 17:30:01 -07:00
Cyrus Najmabadi 9be9f492cd Fix 'use conditional expression' in top level statements 2024-10-26 11:31:59 -07:00
Cyrus Najmabadi 991c7caf5d Fix crash when 'add await' analyzers binding expressions 2024-10-26 10:15:26 -07:00
Cyrus Najmabadi f184408382 Cleanup more 2024-10-26 09:38:05 -07:00
Cyrus Najmabadi 4e57e4c24c Shorten names shown in 'pull member up' 2024-10-26 09:38:01 -07:00
Cyrus Najmabadi 817e545b67 Simplify 2024-10-26 09:20:28 -07:00
Cyrus Najmabadi 76e85d9c45 Add test 2024-10-26 09:18:04 -07:00
Cyrus Najmabadi 409d6a2902 Fix inaccessible protected constructors being shown in sig help 2024-10-26 09:17:22 -07:00
Gen Lu 57c4b92785
Merge pull request #75637 from genlu/otfdExcludeNamespace
Don't show C# on-the-fly-doc for namespace symbols
2024-10-25 17:42:42 -07:00
Todd Grunke dfa08b408e
Don't allocate while walking a NormalizedSnapshotSpanCollection during classification tagging (#75631)
Saw this in a scrolling speedometer profile, only 0.3%, but it's trivial to remove. They don't publicly expose a struct based enumerator, but they do expose an indexer, so it's easy enough to use that to walk over the collection.
2024-10-25 16:35:05 -07:00
gel@microsoft.com 82c13da34c Don't show C# on-the-fly-doc for namespace symbols 2024-10-25 16:22:58 -07:00
Todd Grunke 937d1a4033
Change from ArrayBuilder => SharedPools for pooling inside AddBracePairsAsync (#75630)
It's pretty common for this array to exceed the size threshold supported by ArrayBuilder (128). For the files I'm testing on, the size supported by SharedPools (512) works much better.

Noticed this due to allocations in the editor's scrolling speedometer test, where it was showing up as 1.5% of allocations during scrolling.
2024-10-25 12:33:51 -07:00
David Barbet 56374f2f5b Allow the client to update the server logging level dynamically 2024-10-25 11:33:21 -07:00
Todd Grunke 99860e4363
Fix issue in PatternMatcher code where it was using a caseInsensitive index (#75621)
Noticed this while looking at a pooling issue in related code. The issue here is that the code found a case sensitive index, but was still returning a value based on the case insensitive index in one of the code paths.

Also, made a slight perf optimization to start the case sensitive search at the already located case insensitive search index.
2024-10-25 08:46:40 -07:00
Jan Jones 2c3477184d
Propagate spread suppression (#75596)
* Propagate spread suppression

* Strenghten tests
2024-10-25 11:02:46 +00:00
Cyrus Najmabadi 09a7b38897
Do not lex `..` as a single DotDotToken (#75549)
* Add failing test

* WorkItem :)

* Renames and docs

* Update tests

* Do not have lexer produce .. token

* Move error

* Docs

* Advance

* Place at the same locaiton

* Cleanup and consistency

* Break apart numerics

* in progress

* Lexer work

* restore

* Update src/Compilers/CSharp/Test/Syntax/Parsing/ParsingTests.cs

* Simplify

* Update quick scanner as well

* More cases

* Consequence parsing

* Fixup test

* More precise errors

* Specialized error message

* Simplify expression parsing

* Extract helper

* simplify

* simplify

* simplify

* inline

* Simplify token merging

* Fix

* Simplify

* Simplify

* Simplify

* Update src/Compilers/CSharp/Portable/Parser/LanguageParser.cs

Co-authored-by: Rikki Gibson <rikkigibson@gmail.com>

* Tweak comment

* Grammar

* Update src/Compilers/CSharp/Portable/Parser/LanguageParser.cs

* Lower value slightly

* Fix

* Clean up usings

* Add tests

* Simplify

* Add tests

* Add tests

---------

Co-authored-by: Rekkonnect <8298332+Rekkonnect@users.noreply.github.com>
Co-authored-by: Rikki Gibson <rikkigibson@gmail.com>
2024-10-24 23:56:57 -07:00
Gen Lu cd336d2a7e
Merge pull request #74321 from genlu/codelens
Migrate Codelens provider to .NET
2024-10-24 15:41:45 -07:00
Todd Grunke 34d1835a40
Reduce lock usage during EditDistance.GetEditDistance and BKTree.Find (#75610)
* Reduce lock usage during EditDistance.GetEditDistance and BKTree.Find

The SimplePool and ArrayPool classes previously used always locked on Allocate/Free which is showing up in a trace David Kean referred us to. Instead, as the char arrays being allocated are typically quite small, utilize the stack for these temporary char array locations when possible, falling back to heap allocating in the rare occasions where it's not.
2024-10-24 10:15:28 -07:00
Rikki Gibson a1346ef485
Use distinct EventSource names for compiler and workspace layer events (#75613) 2024-10-24 09:05:10 -07:00
Arun Chander ea13488634
Merge pull request #75616 from dotnet/dev/jorobich/fix-prval-rerun
Ensure we only capture the BuildNumber when setting OriginalBuildNumber.
2024-10-24 08:31:06 -07:00
Jan Jones f822df5874
Fix error message spelling (#75601) 2024-10-24 10:22:19 +02:00
Joey Robichaud d6a1c9d130
Fixup 2024-10-23 23:29:56 -07:00