From 48099a09b41742745126959f86a7f431206da1ab Mon Sep 17 00:00:00 2001 From: Stephen Canon Date: Wed, 3 Nov 2021 09:33:32 -0400 Subject: [PATCH] Clean out some unnecessary stuff in DoubleWidth. --- Sources/_TestSupport/DoubleWidth.swift | 50 -------------------------- 1 file changed, 50 deletions(-) diff --git a/Sources/_TestSupport/DoubleWidth.swift b/Sources/_TestSupport/DoubleWidth.swift index 23e9d1e..b26a337 100644 --- a/Sources/_TestSupport/DoubleWidth.swift +++ b/Sources/_TestSupport/DoubleWidth.swift @@ -135,10 +135,6 @@ extension DoubleWidth : Comparable { } extension DoubleWidth : Hashable { - public var hashValue: Int { - return _hashValue(for: self) - } - public func hash(into hasher: inout Hasher) { hasher.combine(low) hasher.combine(high) @@ -188,52 +184,6 @@ extension DoubleWidth : Numeric { } } -#if false - -// This conformance is only possible once the type is in the stdlib, as it uses -// Builtin -extension DoubleWidth: _ExpressibleByBuiltinIntegerLiteral { - public init(_builtinIntegerLiteral _x: Builtin.IntegerLiteral) { - var _x = _x - self = DoubleWidth() - - // If we can capture the entire literal in a single Int64, stop there. - // This avoids some potential deep recursion due to literal expressions in - // other DoubleWidth methods. - let (_value, _overflow) = Builtin.s_to_s_checked_trunc_IntLiteral_Int64(_x) - if !Bool(_overflow) { - self = DoubleWidth(Int64(_value)) - return - } - - // Convert all but the most significant 64 bits as unsigned integers. - let _shift = Builtin.sext_Int64_IntLiteral((64 as Int64)._value) - let lowWordCount = (bitWidth - 1) / 64 - for i in 0..