Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit e5db8de

Browse files
committed
Delete workaround for #16197 (dotnet/coreclr#16433)
Signed-off-by: dotnet-bot-corefx-mirror <dotnet-bot@microsoft.com>
1 parent b9c5530 commit e5db8de

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

src/Common/src/CoreLib/System/String.Manipulation.cs

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)