Imported Upstream version 4.3.2.467

Former-commit-id: 9c2cb47f45fa221e661ab616387c9cda183f283d
This commit is contained in:
Xamarin Public Jenkins
2016-02-22 11:00:01 -05:00
parent f302175246
commit f3e3aab35a
4097 changed files with 122406 additions and 82300 deletions

View File

@ -1689,10 +1689,10 @@ namespace System
if (keys == null)
throw new ArgumentNullException ("keys");
if (keys.Length != items.Length)
throw new ArgumentException ("Length of keys and items does not match.");
if (keys.Length > items.Length)
throw new ArgumentException ("Length of keys is larger than length of items.");
SortImpl<TKey, TValue> (keys, items, 0, keys.Length, comparer);
}
@ -3102,6 +3102,12 @@ namespace System
return d;
}
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.MayFail)]
public static T[] Empty<T>()
{
return EmptyArray<T>.Value;
}
public static bool Exists<T> (T [] array, Predicate <T> match)
{
if (array == null)
@ -3183,6 +3189,19 @@ namespace System
//
// Moved value from instance into target of different type with no checks (JIT intristics)
//
// Restrictions:
//
// S and R must either:
// both be blitable valuetypes
// both be reference types (IOW, an unsafe cast)
// S and R cannot be float or double
// S and R must either:
// both be a struct
// both be a scalar
// S and R must either:
// be of same size
// both be a scalar of size <= 4
//
internal static R UnsafeMov<S,R> (S instance) {
return (R)(object) instance;
}