Skip to content

Commit a1583cd

Browse files
authored
Merge pull request #13182 from moiseev/double-size
2 parents 6834894 + 156e6eb commit a1583cd

File tree

4 files changed

+13
-8
lines changed

4 files changed

+13
-8
lines changed

stdlib/public/core/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ set(SWIFTLIB_ESSENTIAL
4747
CString.swift
4848
CTypes.swift
4949
DebuggerSupport.swift
50-
DoubleWidth.swift.gyb
50+
# FIXME(double-width): <rdar://problem/32726173>
51+
#DoubleWidth.swift.gyb
5152
DropWhile.swift.gyb
5253
Dump.swift
5354
EmptyCollection.swift

stdlib/public/core/Integers.swift.gyb

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3378,14 +3378,15 @@ ${assignmentOperatorComment(x.operator, True)}
33783378
) -> (quotient: ${Self}, remainder: ${Self}) {
33793379
// FIXME(integers): tests
33803380
% # 128 bit types are not provided by the 32-bit LLVM
3381-
% #if word_bits == 32 and bits == 64:
3382-
% if bits == 64:
3383-
let lhs = DoubleWidth<${Self}>(dividend)
3384-
let rhs = DoubleWidth<${Self}>(self)
3381+
% if word_bits == 32 and bits == 64:
3382+
% #if bits == 64: #FIXME(double-width): uncomment when DoubleWidth is back
3383+
// let lhs = DoubleWidth<${Self}>(dividend)
3384+
// let rhs = DoubleWidth<${Self}>(self)
33853385

3386-
let (quotient, remainder) = lhs.quotientAndRemainder(dividingBy: rhs)
3386+
// let (quotient, remainder) = lhs.quotientAndRemainder(dividingBy: rhs)
33873387
// FIXME(integers): check for high words in quotient and remainder
3388-
return (${Self}(quotient.low), ${Self}(remainder.low))
3388+
// return (${Self}(quotient.low), ${Self}(remainder.low))
3389+
fatalError("Operation is not supported")
33893390
% else:
33903391
// FIXME(integers): handle division by zero and overflows
33913392
_precondition(self != 0, "Division by zero")

test/Constraints/diagnostics_swift4.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,5 @@ 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-
let _ = DoubleWidth<Int>(Int.min) - 1 +=+ Int.min // Ok
57+
// FIXME: uncomment when <rdar://problem/32726173> is resolved and DoubleWidth is back
58+
// let _ = DoubleWidth<Int>(Int.min) - 1 +=+ Int.min // Ok

test/stdlib/DoubleWidth.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
// RUN: %target-run-simple-swift
22
// REQUIRES: executable_test
3+
// FIXME(double-width): <rdar://problem/32726173>
4+
// REQUIRES: rdar32726173
35

46
import StdlibUnittest
57

0 commit comments

Comments
 (0)