Merge pull request dotnet/corert#4918 from dotnet/nmirror
authorJan Kotas <jkotas@microsoft.com>
Sun, 12 Nov 2017 04:45:53 +0000 (20:45 -0800)
committerJan Kotas <jkotas@microsoft.com>
Mon, 13 Nov 2017 21:06:18 +0000 (13:06 -0800)
Merge nmirror to master

Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
src/mscorlib/shared/System/Collections/ListDictionaryInternal.cs
src/mscorlib/shared/System/DefaultBinder.cs
src/mscorlib/shared/System/ReadOnlySpan.cs
src/mscorlib/shared/System/Reflection/MethodInfo.Internal.cs
src/mscorlib/shared/System/Reflection/SignatureTypeExtensions.cs
src/mscorlib/shared/System/Resources/RuntimeResourceSet.cs
src/mscorlib/shared/System/Runtime/CompilerServices/AsyncValueTaskMethodBuilder.cs
src/mscorlib/shared/System/Span.cs
src/mscorlib/shared/System/UnitySerializationHolder.cs

index 28593d3..a8b7a18 100644 (file)
@@ -19,11 +19,11 @@ namespace System.Collections
     ///    will be smaller and faster than a Hashtable if the number of elements is 10 or less.
     ///    This should not be used if performance is important for large numbers of elements.
     [Serializable]
-    [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")] 
-#if CORECLR
-    internal
-#else
+    [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
+#if CORERT
     public
+#else
+    internal
 #endif
     class ListDictionaryInternal : IDictionary
     {
index b6c12b1..f8d8c0c 100644 (file)
@@ -8,10 +8,10 @@ using CultureInfo = System.Globalization.CultureInfo;
 
 namespace System
 {
-#if CORECLR
-    internal
-#else
+#if CORERT
     public sealed
+#else
+    internal
 #endif
     partial class DefaultBinder : Binder
     {
index 9f491f6..28fb2e3 100644 (file)
@@ -173,9 +173,7 @@ namespace System
                 return Unsafe.Add(ref _pointer.Value, index);
             }
 #else
-#if CORERT
             [Intrinsic]
-#endif
             [MethodImpl(MethodImplOptions.AggressiveInlining)]
             [NonVersionable]
             get
index a36ef90..2806be6 100644 (file)
@@ -6,11 +6,10 @@ namespace System.Reflection
 {
     public abstract partial class MethodInfo : MethodBase
     {
-#if CORECLR
-        internal
+#if CORERT        
+        public // Needs to be public so that Reflection.Core can see it.
 #else
-        // Not an api but needs to be public so that Reflection.Core can access it.
-        public
+        internal
 #endif
         virtual int GenericParameterCount => GetGenericArguments().Length;
     }
index f0a33d0..5847944 100644 (file)
@@ -8,10 +8,10 @@ using System.Diagnostics;
 
 namespace System.Reflection
 {
-#if CORECLR
-    internal
-#else
+#if CORERT
     public // Needs to be public so that Reflection.Core can see it.
+#else
+    internal
 #endif
     static class SignatureTypeExtensions
     {
index eadc92c..a63e68c 100644 (file)
@@ -160,10 +160,10 @@ namespace System.Resources
     // into smaller chunks, each of size sqrt(n), would be substantially better for
     // resource files containing thousands of resources.
     // 
-#if CORECLR
-    internal
-#else
+#if CORERT
     public  // On CoreRT, this must be public because of need to whitelist past the ReflectionBlock.
+#else
+    internal
 #endif
     sealed class RuntimeResourceSet : ResourceSet, IEnumerable
     {
@@ -431,4 +431,4 @@ namespace System.Resources
             return value;
         }
     }
-}
\ No newline at end of file
+}
index 813d9e5..b5ecd79 100644 (file)
@@ -25,14 +25,14 @@ namespace System.Runtime.CompilerServices
         /// <summary>Creates an instance of the <see cref="AsyncValueTaskMethodBuilder{TResult}"/> struct.</summary>
         /// <returns>The initialized instance.</returns>
         public static AsyncValueTaskMethodBuilder<TResult> Create() =>
-#if CORECLR
-            // _methodBuilder should be initialized to AsyncTaskMethodBuilder<TResult>.Create(), but on coreclr
-            // that Create() is a nop, so we can just return the default here.
-            default(AsyncValueTaskMethodBuilder<TResult>);
-#else
+#if CORERT
             // corert's AsyncTaskMethodBuilder<TResult>.Create() currently does additional debugger-related
             // work, so we need to delegate to it.
             new AsyncValueTaskMethodBuilder<TResult>() { _methodBuilder = AsyncTaskMethodBuilder<TResult>.Create() };
+#else
+            // _methodBuilder should be initialized to AsyncTaskMethodBuilder<TResult>.Create(), but on coreclr
+            // that Create() is a nop, so we can just return the default here.
+            default(AsyncValueTaskMethodBuilder<TResult>);
 #endif
 
         /// <summary>Begins running the builder with the associated state machine.</summary>
index aec83de..90ef2fc 100644 (file)
@@ -185,9 +185,7 @@ namespace System
                 return ref Unsafe.Add(ref _pointer.Value, index);
             }
 #else
-#if CORERT
             [Intrinsic]
-#endif
             [MethodImpl(MethodImplOptions.AggressiveInlining)]
             [NonVersionable]
             get
index bbfebff..2f30356 100644 (file)
@@ -11,10 +11,10 @@ namespace System
     /// This only exists for compatibility with .NET Framework.
     /// </summary>
     [Serializable]
-#if CORECLR
-    internal
+#if CORERT
+    public
 #else
-    public  // On CoreRT this must be public.
+    internal
 #endif
     sealed class UnitySerializationHolder : ISerializable, IObjectReference
     {