From de195afb43ef79ae9dd6f028f142041ebaff3b0b Mon Sep 17 00:00:00 2001 From: Stephen Toub Date: Tue, 25 Apr 2023 12:03:33 -0400 Subject: [PATCH] Make Guid.HexsToChars aggressively inlined (#85322) To help mono cope with the genericized implementation. This method is only used when Ssse3 or AdvSimd.Arm64 are not supported, or when formatting the rarely-used "X" format, but currently mono AOT without LLVM doesn't enable those intrinsics. --- src/libraries/System.Private.CoreLib/src/System/Guid.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libraries/System.Private.CoreLib/src/System/Guid.cs b/src/libraries/System.Private.CoreLib/src/System/Guid.cs index 12f2f11ce6f02..a42bca4c73dc0 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Guid.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Guid.cs @@ -1052,6 +1052,7 @@ public int CompareTo(Guid value) public static bool operator !=(Guid a, Guid b) => !EqualsCore(a, b); + [MethodImpl(MethodImplOptions.AggressiveInlining)] private static unsafe int HexsToChars(TChar* guidChars, int a, int b) where TChar : unmanaged, IUtfChar { guidChars[0] = TChar.CastFrom(HexConverter.ToCharLower(a >> 4));