Mirror changes from mono/coreclr (mono/mono#17297)
authorDotnet-GitSync-Bot <45578709+Dotnet-GitSync-Bot@users.noreply.github.com>
Sat, 12 Oct 2019 06:50:00 +0000 (23:50 -0700)
committerMarek Safar <marek.safar@gmail.com>
Sat, 12 Oct 2019 06:50:00 +0000 (08:50 +0200)
* Enable fast-paths on Mono for Array (dotnet/coreclrmono/mono#27144)

Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
* [CoreLib] Remove String fields moved to shared

* Stub Array Try* methods

Commit migrated from https://github.com/mono/mono/commit/4e81814709b0ebbab4ed6e5bde22370b0fd5e4ac

src/mono/netcore/System.Private.CoreLib/src/System/Array.cs
src/mono/netcore/System.Private.CoreLib/src/System/String.cs

index 0520760..f823a5a 100644 (file)
@@ -424,6 +424,28 @@ namespace System
                        }
                }
 
+               static bool TrySZBinarySearch (Array sourceArray, int sourceIndex, int count, object? value, out int retVal)
+               {
+                       retVal = default;
+                       return false;
+               }
+
+               static bool TrySZIndexOf (Array sourceArray, int sourceIndex, int count, object? value, out int retVal)
+               {
+                       retVal = default;
+                       return false;
+               }
+
+               static bool TrySZLastIndexOf (Array sourceArray, int sourceIndex, int count, object? value, out int retVal)
+               {
+                       retVal = default;
+                       return false;
+               }
+
+               static bool TrySZReverse (Array array, int index, int count) => false;
+
+               static bool TrySZSort (Array keys, Array? items, int left, int right) => false;
+
                public int GetUpperBound (int dimension)
                {
                        return GetLowerBound (dimension) + GetLength (dimension) - 1;
index 56b6340..e21879c 100644 (file)
@@ -9,11 +9,6 @@ namespace System
 {
        partial class String
        {
-               [NonSerialized]
-               int _stringLength;
-               [NonSerialized]
-               char _firstChar;
-
                [Intrinsic]
                public static readonly String Empty;