Skip to content

[Gardening] Remove DoubleWidth related dead code #23024

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 2, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion benchmark/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ set(SWIFT_BENCH_MODULES
single-source/DictionaryRemove
single-source/DictionarySubscriptDefault
single-source/DictionarySwap
single-source/DoubleWidthDivision
single-source/DropFirst
single-source/DropLast
single-source/DropWhile
Expand Down
63 changes: 0 additions & 63 deletions benchmark/single-source/DoubleWidthDivision.swift

This file was deleted.

2 changes: 0 additions & 2 deletions benchmark/utils/main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ import DictionaryOfAnyHashableStrings
import DictionaryRemove
import DictionarySubscriptDefault
import DictionarySwap
import DoubleWidthDivision
import DropFirst
import DropLast
import DropWhile
Expand Down Expand Up @@ -235,7 +234,6 @@ registerBenchmark(DictionaryOfAnyHashableStrings)
registerBenchmark(DictionaryRemove)
registerBenchmark(DictionarySubscriptDefault)
registerBenchmark(DictionarySwap)
registerBenchmark(DoubleWidthDivision)
registerBenchmark(DropFirst)
registerBenchmark(DropLast)
registerBenchmark(DropWhile)
Expand Down
2 changes: 0 additions & 2 deletions test/Constraints/diagnostics_swift4.swift
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,3 @@ class R<K: Hashable, V> {
infix operator +=+ : AdditionPrecedence
func +=+(_ lhs: Int, _ rhs: Int) -> Bool { return lhs == rhs }
func +=+<T: BinaryInteger>(_ lhs: T, _ rhs: Int) -> Bool { return lhs == rhs }
// FIXME: DoubleWidth is no longer part of the standard library
// let _ = DoubleWidth<Int>(Int.min) - 1 +=+ Int.min // Ok
4 changes: 4 additions & 0 deletions test/Prototypes/DoubleWidth.swift.gyb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@

import StdlibUnittest

// XXX: Auxiliary tests & benchmark for DoubleWidth were removed in PR #23024.
// When the DoubleWidth makes comeback, revert the commits from there to
// ressurect what was just a dead code in the meantime…

/// A fixed-width integer that has twice the bit width of its base type.
///
/// You can use the `DoubleWidth` type to continue calculations with the result
Expand Down
8 changes: 0 additions & 8 deletions test/stdlib/FloatingPoint.swift.gyb
Original file line number Diff line number Diff line change
Expand Up @@ -112,14 +112,6 @@ FloatingPoint.test("BinaryFloatingPoint/genericIntegerConversion") {
expectEqual(Float._convert(from: Int64.max).value, Float(Int64.max))
expectEqual(Float._convert(from: Int64.min).value, Float(Int64.min))

// FIXME: DoubleWidth is no longer part of the standard library
#if false
expectEqual(Float._convert(from: DoubleWidth<UInt64>.max).value, .infinity)
expectEqual(
Float._convert(from: DoubleWidth<DoubleWidth<Int64>>.max).value, .infinity)
expectEqual(
Float._convert(from: DoubleWidth<DoubleWidth<Int64>>.min).value, -.infinity)
#endif
}

FloatingPoint.test("BinaryFloatingPoint/genericFloatingPointConversion") {
Expand Down
12 changes: 0 additions & 12 deletions test/stdlib/Integers.swift.gyb
Original file line number Diff line number Diff line change
Expand Up @@ -914,18 +914,6 @@ tests.test("binaryLogarithm/generic") {
expectEqual(
(42 as MockBinaryInteger<UInt>)._binaryLogarithm(),
(42 as UInt)._binaryLogarithm())
// FIXME: DoubleWidth is no longer part of the standard library
#if false
expectEqual(
(42 as MockBinaryInteger<DoubleWidth<Int>>)._binaryLogarithm(),
(42 as DoubleWidth<Int>)._binaryLogarithm())
expectEqual(
(42 as MockBinaryInteger<DoubleWidth<UInt>>)._binaryLogarithm(),
(42 as DoubleWidth<UInt>)._binaryLogarithm())
expectEqual(
(42 as MockBinaryInteger<DoubleWidth<DoubleWidth<Int>>>)._binaryLogarithm(),
(42 as DoubleWidth<DoubleWidth<Int>>)._binaryLogarithm())
#endif
}

runAllTests()