From 07b9e86eb56cf6c82a6ad5db421db1f9a11bc5e1 Mon Sep 17 00:00:00 2001 From: Eugene Rozenfeld Date: Wed, 7 Mar 2018 14:16:49 -0800 Subject: Remove dead code found by ILLink. (dotnet/coreclr#16759) I'm preparing changes to enable running ILLink on SPC (similarly to what we do on corefx assemblies). There will be a separate PR for those changes. This PR just removes the dead code flagged by ILLink from the sources. Signed-off-by: dotnet-bot --- .../shared/System/Diagnostics/Tracing/ActivityTracker.cs | 5 ----- .../shared/System/Globalization/DaylightTime.cs | 4 ---- src/System.Private.CoreLib/shared/System/IO/Path.cs | 16 ---------------- .../shared/System/IO/PathInternal.Windows.cs | 13 ------------- .../shared/System/Number.Parsing.cs | 3 --- 5 files changed, 41 deletions(-) (limited to 'src') diff --git a/src/System.Private.CoreLib/shared/System/Diagnostics/Tracing/ActivityTracker.cs b/src/System.Private.CoreLib/shared/System/Diagnostics/Tracing/ActivityTracker.cs index 9ac32c3bd..d9f9f081c 100644 --- a/src/System.Private.CoreLib/shared/System/Diagnostics/Tracing/ActivityTracker.cs +++ b/src/System.Private.CoreLib/shared/System/Diagnostics/Tracing/ActivityTracker.cs @@ -247,11 +247,6 @@ namespace System.Diagnostics.Tracing #region private - /// - /// The current activity ID. Use this to log normal events. - /// - private Guid CurrentActivityId { get { return m_current.Value.ActivityId; } } - /// /// Searched for a active (nonstopped) activity with the given name. Returns null if not found. /// diff --git a/src/System.Private.CoreLib/shared/System/Globalization/DaylightTime.cs b/src/System.Private.CoreLib/shared/System/Globalization/DaylightTime.cs index e6920b366..72a572c97 100644 --- a/src/System.Private.CoreLib/shared/System/Globalization/DaylightTime.cs +++ b/src/System.Private.CoreLib/shared/System/Globalization/DaylightTime.cs @@ -11,10 +11,6 @@ namespace System.Globalization private readonly DateTime _end; private readonly TimeSpan _delta; - private DaylightTime() - { - } - public DaylightTime(DateTime start, DateTime end, TimeSpan delta) { _start = start; diff --git a/src/System.Private.CoreLib/shared/System/IO/Path.cs b/src/System.Private.CoreLib/shared/System/IO/Path.cs index fe6234cc7..9033350a8 100644 --- a/src/System.Private.CoreLib/shared/System/IO/Path.cs +++ b/src/System.Private.CoreLib/shared/System/IO/Path.cs @@ -477,22 +477,6 @@ namespace System.IO return true; } - private static string CombineInternal(ReadOnlySpan first, ReadOnlySpan second) - { - if (first.Length == 0) - return second.Length == 0 - ? string.Empty - : new string(second); - - if (second.Length == 0) - return new string(first); - - if (IsPathRooted(second)) - return new string(second); - - return JoinInternal(first, second); - } - private static string CombineInternal(string first, string second) { if (string.IsNullOrEmpty(first)) diff --git a/src/System.Private.CoreLib/shared/System/IO/PathInternal.Windows.cs b/src/System.Private.CoreLib/shared/System/IO/PathInternal.Windows.cs index 81d51ba4b..5b1a133ca 100644 --- a/src/System.Private.CoreLib/shared/System/IO/PathInternal.Windows.cs +++ b/src/System.Private.CoreLib/shared/System/IO/PathInternal.Windows.cs @@ -270,19 +270,6 @@ namespace System.IO return i; } - private static bool StartsWithOrdinal(ReadOnlySpan source, string value) - { - if (source.Length < value.Length) - return false; - - for (int i = 0; i < value.Length; i++) - { - if (value[i] != source[i]) - return false; - } - return true; - } - /// /// Returns true if the path specified is relative to the current drive or working directory. /// Returns false if the path is fixed to a specific drive or UNC path. This method does no diff --git a/src/System.Private.CoreLib/shared/System/Number.Parsing.cs b/src/System.Private.CoreLib/shared/System/Number.Parsing.cs index c6ae34d05..70fc9aea8 100644 --- a/src/System.Private.CoreLib/shared/System/Number.Parsing.cs +++ b/src/System.Private.CoreLib/shared/System/Number.Parsing.cs @@ -956,9 +956,6 @@ namespace System public static unsafe ulong Mantissa(double d) => *((ulong*)&d) & 0x000fffffffffffff; - - public static unsafe bool Sign(double d) => - (*((uint*)&d + 1) >> 31) != 0; } } } -- cgit v1.2.3