Skip to content

Commit cbef630

Browse files
authored
Merge pull request #23024 from palimondo/against-the-dark
[Gardening] Remove DoubleWidth related dead code
2 parents a19a623 + babb97e commit cbef630

File tree

7 files changed

+4
-88
lines changed

7 files changed

+4
-88
lines changed

benchmark/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ set(SWIFT_BENCH_MODULES
7777
single-source/DictionaryRemove
7878
single-source/DictionarySubscriptDefault
7979
single-source/DictionarySwap
80-
single-source/DoubleWidthDivision
8180
single-source/DropFirst
8281
single-source/DropLast
8382
single-source/DropWhile

benchmark/single-source/DoubleWidthDivision.swift

Lines changed: 0 additions & 63 deletions
This file was deleted.

benchmark/utils/main.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ import DictionaryOfAnyHashableStrings
6565
import DictionaryRemove
6666
import DictionarySubscriptDefault
6767
import DictionarySwap
68-
import DoubleWidthDivision
6968
import DropFirst
7069
import DropLast
7170
import DropWhile
@@ -235,7 +234,6 @@ registerBenchmark(DictionaryOfAnyHashableStrings)
235234
registerBenchmark(DictionaryRemove)
236235
registerBenchmark(DictionarySubscriptDefault)
237236
registerBenchmark(DictionarySwap)
238-
registerBenchmark(DoubleWidthDivision)
239237
registerBenchmark(DropFirst)
240238
registerBenchmark(DropLast)
241239
registerBenchmark(DropWhile)

test/Constraints/diagnostics_swift4.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,5 +54,3 @@ class R<K: Hashable, V> {
5454
infix operator +=+ : AdditionPrecedence
5555
func +=+(_ lhs: Int, _ rhs: Int) -> Bool { return lhs == rhs }
5656
func +=+<T: BinaryInteger>(_ lhs: T, _ rhs: Int) -> Bool { return lhs == rhs }
57-
// FIXME: DoubleWidth is no longer part of the standard library
58-
// let _ = DoubleWidth<Int>(Int.min) - 1 +=+ Int.min // Ok

test/Prototypes/DoubleWidth.swift.gyb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44

55
import StdlibUnittest
66

7+
// XXX: Auxiliary tests & benchmark for DoubleWidth were removed in PR #23024.
8+
// When the DoubleWidth makes comeback, revert the commits from there to
9+
// ressurect what was just a dead code in the meantime…
10+
711
/// A fixed-width integer that has twice the bit width of its base type.
812
///
913
/// You can use the `DoubleWidth` type to continue calculations with the result

test/stdlib/FloatingPoint.swift.gyb

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -112,14 +112,6 @@ FloatingPoint.test("BinaryFloatingPoint/genericIntegerConversion") {
112112
expectEqual(Float._convert(from: Int64.max).value, Float(Int64.max))
113113
expectEqual(Float._convert(from: Int64.min).value, Float(Int64.min))
114114

115-
// FIXME: DoubleWidth is no longer part of the standard library
116-
#if false
117-
expectEqual(Float._convert(from: DoubleWidth<UInt64>.max).value, .infinity)
118-
expectEqual(
119-
Float._convert(from: DoubleWidth<DoubleWidth<Int64>>.max).value, .infinity)
120-
expectEqual(
121-
Float._convert(from: DoubleWidth<DoubleWidth<Int64>>.min).value, -.infinity)
122-
#endif
123115
}
124116

125117
FloatingPoint.test("BinaryFloatingPoint/genericFloatingPointConversion") {

test/stdlib/Integers.swift.gyb

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -914,18 +914,6 @@ tests.test("binaryLogarithm/generic") {
914914
expectEqual(
915915
(42 as MockBinaryInteger<UInt>)._binaryLogarithm(),
916916
(42 as UInt)._binaryLogarithm())
917-
// FIXME: DoubleWidth is no longer part of the standard library
918-
#if false
919-
expectEqual(
920-
(42 as MockBinaryInteger<DoubleWidth<Int>>)._binaryLogarithm(),
921-
(42 as DoubleWidth<Int>)._binaryLogarithm())
922-
expectEqual(
923-
(42 as MockBinaryInteger<DoubleWidth<UInt>>)._binaryLogarithm(),
924-
(42 as DoubleWidth<UInt>)._binaryLogarithm())
925-
expectEqual(
926-
(42 as MockBinaryInteger<DoubleWidth<DoubleWidth<Int>>>)._binaryLogarithm(),
927-
(42 as DoubleWidth<DoubleWidth<Int>>)._binaryLogarithm())
928-
#endif
929917
}
930918

931919
runAllTests()

0 commit comments

Comments
 (0)