From 2323fc8513c9f5e60683cf4aa90475b44a550170 Mon Sep 17 00:00:00 2001 From: Theodor Zoulias <48834899+theodorzoulias@users.noreply.github.com> Date: Fri, 31 Mar 2023 03:57:13 +0300 Subject: [PATCH] Correct three code comments in Dictionary.cs (#84128) Three code comments refer to the EqualityComparer.Default, instead of the correct EqualityComparer.Default. --- .../src/System/Collections/Generic/Dictionary.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libraries/System.Private.CoreLib/src/System/Collections/Generic/Dictionary.cs b/src/libraries/System.Private.CoreLib/src/System/Collections/Generic/Dictionary.cs index 339a95ed4ff70..fe5f11e025198 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Collections/Generic/Dictionary.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Collections/Generic/Dictionary.cs @@ -381,7 +381,7 @@ internal ref TValue FindValue(TKey key) Entry[]? entries = _entries; uint collisionCount = 0; - // ValueType: Devirtualize with EqualityComparer.Default intrinsic + // ValueType: Devirtualize with EqualityComparer.Default intrinsic i--; // Value in _buckets is 1-based; subtract 1 from i. We do it here so it fuses with the following conditional. do { @@ -501,7 +501,7 @@ private bool TryInsert(TKey key, TValue value, InsertionBehavior behavior) if (typeof(TKey).IsValueType && // comparer can only be null for value types; enable JIT to eliminate entire if block for ref types comparer == null) { - // ValueType: Devirtualize with EqualityComparer.Default intrinsic + // ValueType: Devirtualize with EqualityComparer.Default intrinsic while (true) { // Should be a while loop https://github.com/dotnet/runtime/issues/9422 @@ -656,7 +656,7 @@ internal static class CollectionsMarshalHelper if (typeof(TKey).IsValueType && // comparer can only be null for value types; enable JIT to eliminate entire if block for ref types comparer == null) { - // ValueType: Devirtualize with EqualityComparer.Default intrinsic + // ValueType: Devirtualize with EqualityComparer.Default intrinsic while (true) { // Should be a while loop https://github.com/dotnet/runtime/issues/9422