From 3afcb3770e9bf79f701b3dd692957768865fefb7 Mon Sep 17 00:00:00 2001 From: Jan Kotas Date: Sun, 18 Feb 2018 07:46:34 -0800 Subject: [PATCH] Delete workaround for #16197 (#16433) --- src/mscorlib/shared/System/String.Manipulation.cs | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/mscorlib/shared/System/String.Manipulation.cs b/src/mscorlib/shared/System/String.Manipulation.cs index f829bd3..1d500e8 100644 --- a/src/mscorlib/shared/System/String.Manipulation.cs +++ b/src/mscorlib/shared/System/String.Manipulation.cs @@ -17,13 +17,6 @@ namespace System { private const int StackallocIntBufferSizeLimit = 128; - // Workaround for https://github.com/dotnet/coreclr/issues/16197 - [StructLayout(LayoutKind.Sequential, Size = StackallocIntBufferSizeLimit * sizeof(int))] - struct StackallocIntBuffer - { - private int _dummy; - } - private static unsafe void FillStringChecked(string dest, int destPos, string src) { Debug.Assert(dest != null); @@ -1079,9 +1072,7 @@ namespace System if (newValue == null) newValue = string.Empty; - // Workaround for https://github.com/dotnet/coreclr/issues/16197 - // Span initialSpan = stackalloc int[StackallocIntBufferSizeLimit]; - Span initialSpan; StackallocIntBuffer initialBuffer; unsafe { initialSpan = new Span(&initialBuffer, StackallocIntBufferSizeLimit); } + Span initialSpan = stackalloc int[StackallocIntBufferSizeLimit]; var replacementIndices = new ValueListBuilder(initialSpan); unsafe -- 2.7.4