Jelajahi Sumber

Bump corefx

Marek Safar 8 tahun lalu
induk
melakukan
1cc3bc58be

+ 1 - 1
external/corefx

@@ -1 +1 @@
-Subproject commit cc09d1e0a6f8908fc6ce2aa5f223e05290d9d49c
+Subproject commit 5eba95b97930be62ad28b02eb75936bf31361e15

+ 1 - 1
mcs/build/config-default.make

@@ -20,7 +20,7 @@ endif
 TEST_HARNESS = $(topdir)/class/lib/$(PROFILE_DIRECTORY)/$(PARENT_PROFILE)nunit-lite-console.exe
 PLATFORM_DEBUG_FLAGS = /debug:portable
 # Workaround for https://bugzilla.xamarin.com/show_bug.cgi?id=59967
-MCS_FLAGS = /features:peverify-compat
+MCS_FLAGS = /features:peverify-compat /langversion:latest
 MBAS_FLAGS = -debug
 LIBRARY_FLAGS =
 ifndef CFLAGS

+ 0 - 1
mcs/class/Microsoft.CSharp/Microsoft.CSharp.dll.sources

@@ -121,7 +121,6 @@ corefx/SR.cs
 ../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/LocalVariable.cs
 ../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/MemberGroup.cs
 ../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/MethodInfo.cs
-../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/MethodReference.cs
 ../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/NamedArgumentSpecification.cs
 ../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/Property.cs
 ../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/PropertyInfo.cs

+ 2 - 0
mcs/class/System.Data/corefx/SR.cs

@@ -804,4 +804,6 @@ partial class SR
 	public const string Odbc_ExceptionMessage = "{0} [{1}] {2}";
 	public const string Odbc_ConnectionClosed = "The connection is closed.";
 	public const string Odbc_OpenConnectionNoOwner = "An internal connection does not have an owner.";
+	public const string Odbc_PlatformNotSupported = "System.Data.ODBC is not supported on this platform.";
+	public const string Odbc_UnixOdbcNotFound = "Dependency unixODBC with minimum version 2.3.1 is required.";
 }

+ 0 - 16
mcs/class/System.Data/corefx/SqlParameter.cs

@@ -11,22 +11,6 @@ namespace System.Data.SqlClient
 {
 	partial class SqlParameter
 	{
-		public SqlParameter(string parameterName, SqlDbType dbType, int size, ParameterDirection direction, bool isNullable, byte precision, byte scale, string sourceColumn, DataRowVersion sourceVersion, object value)
-		{
-			if (parameterName == null)
-				parameterName = string.Empty;
-
-			_isNull = isNullable;
-			Value = value;
-			Scale = scale;
-			Size = size;
-			Precision = precision;
-			SqlDbType = dbType;
-			Direction = direction;
-			SourceColumn = sourceColumn;
-			SourceVersion = sourceVersion;
-		}
-
 		[MonoTODO]
 		public string UdtTypeName
 		{

+ 3 - 0
mcs/class/System/Makefile

@@ -95,6 +95,9 @@ endif
 
 TXT_RESOURCE_STRINGS = ../referencesource/System/System.txt
 
+
+API_BIN_REFS := System.Net.Http
+
 #
 # Flags used to build the secxml version of System.
 #

+ 12 - 0
mcs/class/System/System.IO.Compression/DeflateStream.cs

@@ -34,6 +34,8 @@ using System;
 using System.IO;
 using System.Runtime.InteropServices;
 using System.Runtime.Remoting.Messaging;
+using System.Threading;
+using System.Threading.Tasks;
 
 namespace System.IO.Compression
 {
@@ -130,6 +132,11 @@ namespace System.IO.Compression
 			}
 		}
 
+		internal ValueTask<int> ReadAsyncMemory (Memory<byte> destination, CancellationToken cancellationToken)
+		{
+			throw new NotImplementedException ();
+		}
+
 		internal int ReadCore (Span<byte> destination)
 		{
 			throw new NotImplementedException ();
@@ -165,6 +172,11 @@ namespace System.IO.Compression
 			}
 		}
 
+		internal Task WriteAsyncMemory (ReadOnlyMemory<byte> source, CancellationToken cancellationToken)
+		{
+			throw new NotImplementedException ();
+		}
+
 		internal void WriteCore (ReadOnlySpan<byte> source)
 		{
 			throw new NotImplementedException ();

+ 6 - 1
mcs/class/corlib/System.Runtime.CompilerServices/Unsafe.cs

@@ -39,7 +39,12 @@ namespace System.Runtime.CompilerServices
 		{
 			throw new NotImplementedException ();
 		}
-		
+
+		public unsafe static void* Add<T> (void* source, int elementOffset)
+		{
+			throw new NotImplementedException ();
+		}
+
 		public static ref T AddByteOffset<T> (ref T source, System.IntPtr byteOffset)
 		{
 			throw new NotImplementedException ();

+ 2 - 0
mcs/class/corlib/corefx/SR.cs

@@ -823,4 +823,6 @@ partial class SR
 	public const string CannotCallGetHashCodeOnSpan = "GetHashCode() on Span and ReadOnlySpan is not supported.";
 	public const string Argument_EmptyValue = "Value cannot be empty.";
 	public const string PlatformNotSupported_RuntimeInformation = "RuntimeInformation is not supported for Portable Class Libraries.";
+	public const string MemoryDisposed = "Memory<T> has been disposed.";
+	public const string OutstandingReferences = "Release all references before disposing this instance.";
 }

+ 13 - 0
mcs/class/corlib/corert/Stream.cs

@@ -1,3 +1,6 @@
+using System.Threading;
+using System.Threading.Tasks;
+
 namespace System.IO
 {
 	partial class Stream
@@ -11,5 +14,15 @@ namespace System.IO
 		{
 			throw new NotImplementedException ();
 		}
+
+		public virtual ValueTask<int> ReadAsync(Memory<byte> destination, CancellationToken cancellationToken = default(CancellationToken))
+		{
+			throw new NotImplementedException ();
+		}
+
+		public virtual Task WriteAsync(ReadOnlyMemory<byte> source, CancellationToken cancellationToken = default(CancellationToken))
+		{
+			throw new NotImplementedException ();
+		}
 	}
 }

+ 7 - 0
mcs/class/corlib/corlib.dll.sources

@@ -1679,17 +1679,24 @@ corefx/SR.cs
 ../../../external/corefx/src/System.Collections.Concurrent/src/System/Collections/Concurrent/Partitioner.cs
 ../../../external/corefx/src/System.Collections.Concurrent/src/System/Collections/Concurrent/PartitionerStatic.cs
 
+../../../external/corefx/src/System.Memory/src/System/Memory.cs
+../../../external/corefx/src/System.Memory/src/System/MemoryDebugView.cs
 ../../../external/corefx/src/System.Memory/src/System/Pinnable.cs
+../../../external/corefx/src/System.Memory/src/System/ReadOnlyMemory.cs
 ../../../external/corefx/src/System.Memory/src/System/ReadOnlySpan.cs
 ../../../external/corefx/src/System.Memory/src/System/Span.cs
 ../../../external/corefx/src/System.Memory/src/System/SpanDebugView.cs
 ../../../external/corefx/src/System.Memory/src/System/SpanHelpers.cs
 ../../../external/corefx/src/System.Memory/src/System/SpanHelpers.Clear.cs
 ../../../external/corefx/src/System.Memory/src/System/ThrowHelper.cs
+../../../external/corefx/src/System.Memory/src/System/Buffers/*.cs
 
 ../../../external/corefx/src/System.Runtime.InteropServices.RuntimeInformation/src/System/Runtime/InteropServices/RuntimeInformation/OSPlatform.cs
 ../../../external/corefx/src/System.Runtime.InteropServices.RuntimeInformation/src/System/Runtime/InteropServices/RuntimeInformation/Architecture.cs
 
+../../../external/corefx/src/System.Threading.Tasks.Extensions/src/System/Threading/Tasks/ValueTask.cs
+../../../external/corefx/src/System.Threading.Tasks.Extensions/src/System/Runtime/CompilerServices/*.cs
+
 System.Security.Cryptography.X509Certificates/X509CertificateImplApple.cs
 System.Security.Cryptography.X509Certificates/X509Helper.Apple.cs
 CoreFoundation/CFHelpers.cs

+ 3 - 3
mcs/class/corlib/corlib_xtest.dll.sources

@@ -154,10 +154,10 @@
 
 # System.Threading.Tasks
 ../../../external/corefx/src/System.Threading.Tasks/tests/System.Runtime.CompilerServices/*.cs
-../../../external/corefx/src/System.Threading.Tasks/tests/Task/*.cs:TaskStatusTest.netcoreapp.cs,EtwTests.cs,TaskCancelWaitTests.cs
+../../../external/corefx/src/System.Threading.Tasks/tests/Task/*.cs:*.netcoreapp.cs,TaskContinueWithTests.cs
 ../../../external/corefx/src/System.Threading.Tasks/tests/TaskFactory/*.cs
 ../../../external/corefx/src/System.Threading.Tasks/tests/TaskScheduler/*.cs
-../../../external/corefx/src/System.Threading.Tasks/tests/*.cs:UnwrapTests.cs
+../../../external/corefx/src/System.Threading.Tasks/tests/*.cs:UnwrapTests.cs,CancellationTokenTests.netcoreapp.cs
 
 # System.Threading.Tasks.Parallel
 ../../../external/corefx/src/System.Threading.Tasks.Parallel/tests/*.cs:XunitAssemblyAttributes.cs,EtwTests.cs
@@ -172,4 +172,4 @@
 ../../../external/corefx/src/System.Threading/tests/*.cs:MutexTests.cs,SemaphoreTests.cs,InterlockedTests.netcoreapp.cs,EventWaitHandleTests.cs,XunitAssemblyAttributes.cs,ReaderWriterLockTests.cs,SynchronizationContextTests.cs,ExecutionContextTests.cs,HostExecutionContextManagerTests.cs,EtwTests.cs
 
 # System.Text.RegularExpressions
-../../../external/corefx/src/System.Text.RegularExpressions/tests/*.cs:CaptureCollectionTests.netcoreapp.cs,GroupCollectionTests.netcoreapp.cs,MatchCollectionTests.netcoreapp.cs,Regex.Groups.Tests.cs,Regex.Match.Tests.cs,Regex.Serialization.cs,MatchCollectionTests.cs
+../../../external/corefx/src/System.Text.RegularExpressions/tests/*.cs:CaptureCollectionTests.netcoreapp.cs,GroupCollectionTests.netcoreapp.cs,MatchCollectionTests.netcoreapp.cs,PrecompiledRegexScenarioTest.cs,RegexCompilationInfoTests.cs,RegexGroupNameTests.cs,Regex.Groups.Tests.cs,Regex.Match.Tests.cs,Regex.Serialization.cs,MatchCollectionTests.cs,Regex.Ctor.Tests.cs,GroupCollectionTests2.cs,MatchCollectionTests2.cs,CaptureCollectionTests2.cs

+ 7 - 0
mcs/class/referencesource/mscorlib/system/threading/Tasks/Task.cs

@@ -1565,6 +1565,13 @@ namespace System.Threading.Tasks
             return (flags & TASK_STATE_COMPLETED_MASK) != 0;
         }
 
+#if MONO
+        public bool IsCompletedSuccessfully
+        {
+            get { return (m_stateFlags & TASK_STATE_COMPLETED_MASK) == TASK_STATE_RAN_TO_COMPLETION; }
+        }
+#endif
+
         // For use in InternalWait -- marginally faster than (Task.Status == TaskStatus.RanToCompletion)
         internal bool IsRanToCompletion
         {

+ 2 - 0
mcs/class/referencesource/mscorlib/system/throwhelper.cs

@@ -472,6 +472,8 @@ namespace System {
         sourceBytesToCopy,
 #if MONO
         start,
+        pointer,
+        ownedMemory
 #endif
     }
 

+ 1 - 0
mcs/class/test-helpers/PlatformDetection.cs

@@ -8,5 +8,6 @@ namespace System
 		public static readonly bool IsFullFramework = true;
 		public static readonly bool IsWindowsNanoServer = false;
 		public static bool IsNonZeroLowerBoundArraySupported => true;
+		public static bool IsUap => false;
 	}
 }