Bump corefx
authorMarek Safar <marek.safar@gmail.com>
Sat, 18 Feb 2017 13:09:18 +0000 (14:09 +0100)
committerMarek Safar <marek.safar@gmail.com>
Mon, 20 Feb 2017 16:16:02 +0000 (17:16 +0100)
external/corefx
mcs/class/System.Core/dynamic_System.Core.dll.sources
mcs/class/corlib/System/Array.cs
mcs/class/referencesource/System/compmod/system/collections/generic/stack.cs

index 7668f9bab6c688eef882bfd0b74dd5e86a9ddc11..10b23d348821eeebbfe1db0b306e2d764655b4ed 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 7668f9bab6c688eef882bfd0b74dd5e86a9ddc11
+Subproject commit 10b23d348821eeebbfe1db0b306e2d764655b4ed
index 7336284054710a8c125652ea245673b3e70a1aba..27d916c49d552f573fbea9fbcaf3835ea125e6b9 100644 (file)
@@ -13,7 +13,7 @@
 ../../../external/corefx/src/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/CompilerScope.Storage.cs
 ../../../external/corefx/src/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/CompilerScope.cs
 ../../../external/corefx/src/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/ILGen.cs
-../../../external/corefx/src/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/KeyedQueue.cs
+../../../external/corefx/src/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/KeyedStack.cs
 ../../../external/corefx/src/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/LabelInfo.cs
 ../../../external/corefx/src/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/LambdaCompiler.Address.cs
 ../../../external/corefx/src/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/LambdaCompiler.Binary.cs
index 8f6e0aa098e40b238d2738503705207086c3eb80..2027b128e93c294abf00fa2b8783463a186e5c79 100644 (file)
@@ -3130,6 +3130,30 @@ namespace System
                        return new ReadOnlyCollection<T> (array);
                }
 
+               public static void Fill<T> (T[] array, T value)
+               {
+                       if (array == null)
+                               throw new ArgumentNullException (nameof (array));
+
+                       for (int i = 0; i < array.Length; i++)
+                               array [i] = value;
+               }
+
+               public static void Fill<T> (T[] array, T value, int startIndex, int count)
+               {
+                       if (array == null)
+                               throw new ArgumentNullException (nameof (array));
+
+                       if (startIndex < 0 || startIndex > array.Length)
+                               throw new ArgumentOutOfRangeException (nameof (startIndex));
+
+                       if (count < 0 || startIndex > array.Length - count)
+                               throw new ArgumentOutOfRangeException (nameof (count));
+
+                       for (int i = startIndex; i < startIndex + count; i++)
+                               array [i] = value;
+               }
+
                public static T Find<T> (T [] array, Predicate<T> match)
                {
                        if (array == null)
index eb8d46d665f2ecc7389528bf84f1f2e211424909..2a88477ebb7106342eac3e23b62d255ecd892b31 100644 (file)
@@ -227,6 +227,22 @@ namespace System.Collections.Generic {
             _array[_size] = default(T);     // Free memory quicker.
             return item;
         }
+
+#if MONO
+        public bool TryPop(out T result)
+        {
+            if (_size == 0)
+            {
+                result = default(T);
+                return false;
+            }
+
+            _version++;
+            result = _array[--_size];
+            _array[_size] = default(T);     // Free memory quicker.
+            return true;
+        }
+#endif
     
         // Pushes an item to the top of the stack.
         //