Skip to content

Commit 2714d92

Browse files
Remove unused functions (#79234)
1 parent fb38d6b commit 2714d92

File tree

2 files changed

+0
-25
lines changed

2 files changed

+0
-25
lines changed

src/Compilers/Core/Portable/InternalUtilities/Hash.cs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -302,18 +302,6 @@ internal static int GetCaseInsensitiveFNVHashCode(ReadOnlySpan<char> data)
302302
return hashCode;
303303
}
304304

305-
/// <summary>
306-
/// Compute the hashcode of a sub-string using FNV-1a
307-
/// See http://en.wikipedia.org/wiki/Fowler%E2%80%93Noll%E2%80%93Vo_hash_function
308-
/// </summary>
309-
/// <param name="text">The input string</param>
310-
/// <param name="start">The start index of the first character to hash</param>
311-
/// <returns>The FNV-1a hash code of the substring beginning at <paramref name="start"/> and ending at the end of the string.</returns>
312-
internal static int GetFNVHashCode(string text, int start)
313-
{
314-
return GetFNVHashCode(text, start, length: text.Length - start);
315-
}
316-
317305
/// <summary>
318306
/// Compute the hashcode of a string using FNV-1a
319307
/// See http://en.wikipedia.org/wiki/Fowler%E2%80%93Noll%E2%80%93Vo_hash_function

src/Compilers/Core/Portable/InternalUtilities/StringTable.cs

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -561,19 +561,6 @@ private void AddSharedEntry(int hashCode, string text)
561561
Volatile.Write(ref arr[idx].Text, text);
562562
}
563563

564-
internal static string AddShared(StringBuilder chars)
565-
{
566-
var hashCode = Hash.GetFNVHashCode(chars);
567-
568-
string? shared = FindSharedEntry(chars, hashCode);
569-
if (shared != null)
570-
{
571-
return shared;
572-
}
573-
574-
return AddSharedSlow(hashCode, chars);
575-
}
576-
577564
private static string AddSharedSlow(int hashCode, StringBuilder builder)
578565
{
579566
string text = builder.ToString();

0 commit comments

Comments
 (0)