This repository was archived by the owner on Jan 23, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +1
-10
lines changed
src/Common/src/CoreLib/System Expand file tree Collapse file tree 1 file changed +1
-10
lines changed Original file line number Diff line number Diff line change @@ -17,13 +17,6 @@ public partial class String
1717 {
1818 private const int StackallocIntBufferSizeLimit = 128 ;
1919
20- // Workaround for https://github.com/dotnet/coreclr/issues/16197
21- [ StructLayout ( LayoutKind . Sequential , Size = StackallocIntBufferSizeLimit * sizeof ( int ) ) ]
22- struct StackallocIntBuffer
23- {
24- private int _dummy ;
25- }
26-
2720 private static unsafe void FillStringChecked ( string dest , int destPos , string src )
2821 {
2922 Debug . Assert ( dest != null ) ;
@@ -1079,9 +1072,7 @@ public string Replace(string oldValue, string newValue)
10791072 if ( newValue == null )
10801073 newValue = string . Empty ;
10811074
1082- // Workaround for https://github.com/dotnet/coreclr/issues/16197
1083- // Span<int> initialSpan = stackalloc int[StackallocIntBufferSizeLimit];
1084- Span < int > initialSpan ; StackallocIntBuffer initialBuffer ; unsafe { initialSpan = new Span < int > ( & initialBuffer , StackallocIntBufferSizeLimit ) ; }
1075+ Span < int > initialSpan = stackalloc int [ StackallocIntBufferSizeLimit ] ;
10851076 var replacementIndices = new ValueListBuilder < int > ( initialSpan ) ;
10861077
10871078 unsafe
You can’t perform that action at this time.
0 commit comments