Skip to content

Commit 1171b0c

Browse files
committed
Bump corefx
1 parent 70deea8 commit 1171b0c

File tree

4 files changed

+42
-2
lines changed

4 files changed

+42
-2
lines changed

external/corefx

Submodule corefx updated 1483 files

mcs/class/System.Core/dynamic_System.Core.dll.sources

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
../../../external/corefx/src/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/CompilerScope.Storage.cs
1414
../../../external/corefx/src/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/CompilerScope.cs
1515
../../../external/corefx/src/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/ILGen.cs
16-
../../../external/corefx/src/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/KeyedQueue.cs
16+
../../../external/corefx/src/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/KeyedStack.cs
1717
../../../external/corefx/src/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/LabelInfo.cs
1818
../../../external/corefx/src/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/LambdaCompiler.Address.cs
1919
../../../external/corefx/src/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/LambdaCompiler.Binary.cs

mcs/class/corlib/System/Array.cs

+24
Original file line numberDiff line numberDiff line change
@@ -3130,6 +3130,30 @@ public static ReadOnlyCollection<T> AsReadOnly<T> (T[] array)
31303130
return new ReadOnlyCollection<T> (array);
31313131
}
31323132

3133+
public static void Fill<T> (T[] array, T value)
3134+
{
3135+
if (array == null)
3136+
throw new ArgumentNullException (nameof (array));
3137+
3138+
for (int i = 0; i < array.Length; i++)
3139+
array [i] = value;
3140+
}
3141+
3142+
public static void Fill<T> (T[] array, T value, int startIndex, int count)
3143+
{
3144+
if (array == null)
3145+
throw new ArgumentNullException (nameof (array));
3146+
3147+
if (startIndex < 0 || startIndex > array.Length)
3148+
throw new ArgumentOutOfRangeException (nameof (startIndex));
3149+
3150+
if (count < 0 || startIndex > array.Length - count)
3151+
throw new ArgumentOutOfRangeException (nameof (count));
3152+
3153+
for (int i = startIndex; i < startIndex + count; i++)
3154+
array [i] = value;
3155+
}
3156+
31333157
public static T Find<T> (T [] array, Predicate<T> match)
31343158
{
31353159
if (array == null)

mcs/class/referencesource/System/compmod/system/collections/generic/stack.cs

+16
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,22 @@ public T Pop() {
227227
_array[_size] = default(T); // Free memory quicker.
228228
return item;
229229
}
230+
231+
#if MONO
232+
public bool TryPop(out T result)
233+
{
234+
if (_size == 0)
235+
{
236+
result = default(T);
237+
return false;
238+
}
239+
240+
_version++;
241+
result = _array[--_size];
242+
_array[_size] = default(T); // Free memory quicker.
243+
return true;
244+
}
245+
#endif
230246

231247
// Pushes an item to the top of the stack.
232248
//

0 commit comments

Comments
 (0)