diff options
author | Marek Safar <marek.safar@gmail.com> | 2017-08-07 17:39:39 +0300 |
---|---|---|
committer | Marek Safar <marek.safar@gmail.com> | 2017-10-05 23:43:54 +0300 |
commit | 411a37af27905eaa44dac1a31f6387a11c0b0244 (patch) | |
tree | 91ae551aa6c377e83f0c3ba8cfe93201296cce0b /mcs/class/referencesource | |
parent | 3e9d7d6e9cf8dc33eb29c497c350a1cd7df3a057 (diff) |
Bump corefx
Diffstat (limited to 'mcs/class/referencesource')
4 files changed, 29 insertions, 2 deletions
diff --git a/mcs/class/referencesource/mscorlib/system/double.cs b/mcs/class/referencesource/mscorlib/system/double.cs index 57b4b632721..74211ede99e 100644 --- a/mcs/class/referencesource/mscorlib/system/double.cs +++ b/mcs/class/referencesource/mscorlib/system/double.cs @@ -103,6 +103,16 @@ namespace System { return (*(UInt64*)(&d) & 0x7FFFFFFFFFFFFFFFL) > 0x7FF0000000000000L; } +#if MONO + [Pure] + [System.Runtime.Versioning.NonVersionable] + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe static bool IsFinite(double d) + { + var bits = BitConverter.DoubleToInt64Bits(d); + return (bits & 0x7FFFFFFFFFFFFFFF) < 0x7FF0000000000000; + } +#endif // Compares this object to another object, returning an instance of System.Relation. // Null is considered less than any instance. diff --git a/mcs/class/referencesource/mscorlib/system/io/stream.cs b/mcs/class/referencesource/mscorlib/system/io/stream.cs index fa022e96e5d..d830182a037 100644 --- a/mcs/class/referencesource/mscorlib/system/io/stream.cs +++ b/mcs/class/referencesource/mscorlib/system/io/stream.cs @@ -40,7 +40,7 @@ namespace System.IO { [ContractClass(typeof(StreamContract))] #endif #if FEATURE_REMOTING || MONO - public abstract class Stream : MarshalByRefObject, IDisposable { + public abstract partial class Stream : MarshalByRefObject, IDisposable { #else // FEATURE_REMOTING public abstract class Stream : IDisposable { #endif // FEATURE_REMOTING @@ -195,6 +195,9 @@ namespace System.IO { InternalCopyTo(destination, _DefaultCopyBufferSize); } +#if MONO + virtual +#endif public void CopyTo(Stream destination, int bufferSize) { if (destination == null) diff --git a/mcs/class/referencesource/mscorlib/system/single.cs b/mcs/class/referencesource/mscorlib/system/single.cs index 5e2cf73befd..3338e560db9 100644 --- a/mcs/class/referencesource/mscorlib/system/single.cs +++ b/mcs/class/referencesource/mscorlib/system/single.cs @@ -76,6 +76,15 @@ namespace System { return (*(int*)(&f) & 0x7FFFFFFF) > 0x7F800000; } +#if MONO + [Pure] + [System.Runtime.Versioning.NonVersionable] + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe static bool IsFinite(float f) { + return (*(int*)(&f) & 0x7FFFFFFF) < 0x7F800000; + } +#endif + // Compares this object to another object, returning an integer that // indicates the relationship. // Returns a value less than zero if this object diff --git a/mcs/class/referencesource/mscorlib/system/throwhelper.cs b/mcs/class/referencesource/mscorlib/system/throwhelper.cs index a47c670b31a..4bb821293cc 100644 --- a/mcs/class/referencesource/mscorlib/system/throwhelper.cs +++ b/mcs/class/referencesource/mscorlib/system/throwhelper.cs @@ -51,7 +51,7 @@ namespace System { using System.Diagnostics.Contracts; [Pure] - internal static class ThrowHelper { + internal static partial class ThrowHelper { internal static void ThrowArgumentOutOfRangeException() { ThrowArgumentOutOfRangeException(ExceptionArgument.index, ExceptionResource.ArgumentOutOfRange_Index); } @@ -76,6 +76,7 @@ namespace System { throw new ArgumentException(Environment.GetResourceString(GetResourceName(resource)), GetArgumentName(argument)); } +#if !MONO internal static void ThrowArgumentNullException(ExceptionArgument argument) { throw new ArgumentNullException(GetArgumentName(argument)); } @@ -83,6 +84,7 @@ namespace System { internal static void ThrowArgumentOutOfRangeException(ExceptionArgument argument) { throw new ArgumentOutOfRangeException(GetArgumentName(argument)); } +#endif internal static void ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource) { @@ -468,6 +470,9 @@ namespace System { options, view, sourceBytesToCopy, +#if MONO + start, +#endif } // |