Skip to content

Commit

Permalink
Make Guid.HexsToChars aggressively inlined (#85322)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
stephentoub authored Apr 25, 2023
1 parent a43e67c commit de195af
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/libraries/System.Private.CoreLib/src/System/Guid.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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>(TChar* guidChars, int a, int b) where TChar : unmanaged, IUtfChar<TChar>
{
guidChars[0] = TChar.CastFrom(HexConverter.ToCharLower(a >> 4));
Expand Down

0 comments on commit de195af

Please sign in to comment.