[netcore] Optimize RuntimeType::IsSZArray. (mono/mono#18347)
authorZoltan Varga <vargaz@gmail.com>
Mon, 6 Jan 2020 15:36:59 +0000 (16:36 +0100)
committerGitHub <noreply@github.com>
Mon, 6 Jan 2020 15:36:59 +0000 (16:36 +0100)
Commit migrated from https://github.com/mono/mono/commit/384db9e89053822a2d51cc19d7084ce75a636b37

src/mono/netcore/System.Private.CoreLib/src/System/RuntimeType.Mono.cs

index 0f58b5d..e353629 100644 (file)
@@ -2502,8 +2502,7 @@ namespace System
 
                public override bool IsSZArray {
                        get {
-                               // TODO: intrinsic
-                               return IsArray && ReferenceEquals (this, GetElementType ().MakeArrayType ());
+                               return RuntimeTypeHandle.IsSzArray (this);
                        }
                }