Merge branch 'master' of github.com:dotnet/runtime into type-isassignedfrom
authorEgorBo <egorbo@gmail.com>
Sat, 1 Feb 2020 11:39:08 +0000 (14:39 +0300)
committerEgorBo <egorbo@gmail.com>
Sat, 1 Feb 2020 11:39:08 +0000 (14:39 +0300)
# Conflicts:
# src/coreclr/tests/src/JIT/Intrinsics/TypeIntrinsics.cs
# src/libraries/System.Private.CoreLib/src/System/Type.Helpers.cs

1  2 
src/coreclr/src/jit/importer.cpp
src/coreclr/src/jit/namedintrinsiclist.h
src/coreclr/tests/src/JIT/Intrinsics/TypeIntrinsics.cs
src/libraries/System.Private.CoreLib/src/System/Type.Helpers.cs

@@@ -4385,13 -4341,9 +4384,13 @@@ NamedIntrinsic Compiler::lookupNamedInt
              {
                  result = NI_System_Type_get_IsValueType;
              }
 +            else if (strcmp(methodName, "IsAssignableFrom") == 0)
 +            {
 +                result = NI_System_Type_IsAssignableFrom;
 +            }
          }
      }
- #if defined(_TARGET_XARCH_) // We currently only support BSWAP on x86
+ #if defined(TARGET_XARCH) // We currently only support BSWAP on x86
      else if (strcmp(namespaceName, "System.Buffers.Binary") == 0)
      {
          if ((strcmp(className, "BinaryPrimitives") == 0) && (strcmp(methodName, "ReverseEndianness") == 0))
@@@ -2,8 -2,8 +2,9 @@@
  // The .NET Foundation licenses this file to you under the MIT license.
  // See the LICENSE file in the project root for more information.
  
+ using System.Diagnostics.CodeAnalysis;
  using System.Reflection;
 +using System.Runtime.CompilerServices;
  
  namespace System
  {
              return false;
          }
  
-         public virtual bool IsAssignableFrom(Type? c)
 +        [Intrinsic]
+         public virtual bool IsAssignableFrom([NotNullWhen(true)] Type? c)
          {
              if (c == null)
                  return false;