Age | Commit message (Collapse) | Author |
|
|
|
* Rewrite the rest of the array non-generic fast paths in C# (#27703)
* Rewrite the rest of the array non-generic fast paths in C#
* Add missing resource string
* Use CorElementType and handle native ints to match the unmanaged implementation
* Avoid try pattern for Sort and Reverse
* Match the native implementation more closely
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
* Rewrite Enum.CompareTo in C# (dotnet/coreclr#27792)
* Rewrite Enum.CompareTo in C#
* Handle floating point too for match the existing native implementation
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
* Remove unused argument from GetRegionDisplayName (dotnet/coreclr#27806)
* Remove unused argument from GetRegionDisplayName
* Address race conditions in CultureData
While most of the race conditions in this file are benign, in these cases, a thread could end up returning an intermediate value due to multiple potential writes to the same field.
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
* Fix StyleCop rule SA1129 ("Do not use default value type constructor") (#27716)
Will enable the rule in corefx once these changes have propagated.
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
* Remove non-shared Enum.CompareTo/InternalCompareTo implementation, add new Array icalls used by shared code
|
|
- Merge RuntimeImports that has just a few FCalls into Buffer.
- Delete assembly implementation of memcpy for ARM. The implementation was outdated and it was used only on Windows ARM and only for fraction of memcpy callsites.
- Delete unnecessary PInvoke into SysStringLen. We have a managed equivalent on System.Runtime.InteropServices.Marshal.
- Delete large amount of redundant code between SecureString.Windows.cs and SecureString.Unix.cs, and switch SecureString to use Spans
- Fold null check into IsWin32Atom
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
|
|
* Rewrite Buffer.BlockCopy in C#
Fixes #27106
* Workaround to enable type check optimizations for BlockCopy only
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
|
|
Prep-work for #27106
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
|
|
* Remove unnecessary asserts
* Make several classes static
* Use is instead of as+null check
* Use T? instead of Nullable<T>
* more static classes
* Mark locals as const
* Merge declaration and initialization of some variables
* Remove unnecessary casts
* Remove unnecessary "unsafe"s
* Simplify several lambda expressions
* Remove redundant parentheses
* Remove redundant '== true'
* Remove redundant empty lines
* Simplify boolean comparison with '== false'
* Replace if-statement with return statement
* Use while for infinite loop
* Add static to all partial static class declarations
* Use ++/-- operator instead of assignment
* Use string.IsNullOrEmpty
* Use coalesce expression
* Simplify lazy initialization
* Use coalese expression
* Join string expressions
* Use regular string literal instead of verbatim string literal
* Optimize StringBuilder.Append calls
* Remove redundant assignment
* Remove unnecessary unsafe context
* Merge processor directives
* Use String.Equals instead of String.Compare
* Use Debug.Fail instead of Debug.Assert(false
* Remove Attribute suffix
* Use predefined type
* Use compound assignment
* Use while statement to create an infinite loop
* Remove redundant base ctor call
* Avoid using catch (Exception)
* Remove empty regions
* Span comparison to null
* Avoid unnecessary boxing of value type
* Expression is always equal to 'true'
* Remove unused method
* update coalesce assignment
* fix unsafe
* fix redundant parens
* Fix whitespace errors introduced
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
|
|
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
|
|
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
|
|
lines) (#40113)
Mechanical/automated change. The only manual changes were a) removing the two rules from the CodeAnalysis.ruleset file, b) removing spaces from one line of a .targets file that is used to generate a .cs file, and c) reverting the changes in a few test files where the naive replacement happened in the middle of a verbatim string where the whitespace actually mattered.
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
|
|
* Enable nullable at the project level
* Remove `#nullable enable` from individual files
Removes `#nullable enable` from almost all .cs files in System.Private.CoreLib. I left it only in the ~30 files (out of ~1480 that had it) that are mirrored to corefx, that are built into projects by corefx that don't yet set NullableContextOptions at the project level, and that use nullable annotations; otherwise, they'd break the corefx build.
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
|
|
* Nullable: shared\System (most of it)
And some other things it touches.
* Nullable: src\System (most of it)
* Address PR feedback
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
|
|
* Move Buffer constants to platform specific files
* Add explicit access modifier
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
|
|
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
|