Skip to content

Commit 36786a0

Browse files
authored
Merge pull request #19918 from moiseev/int-fixme
[stdlib] Remove sil-serialize-all FIXMEs from integers
2 parents b0389af + d6501e2 commit 36786a0

File tree

2 files changed

+17
-21
lines changed

2 files changed

+17
-21
lines changed

stdlib/public/core/IntegerTypes.swift.gyb

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1400,31 +1400,31 @@ ${assignmentOperatorComment(x.operator, True)}
14001400
}
14011401

14021402
/// A type that represents the words of this integer.
1403-
@_fixed_layout // FIXME(sil-serialize-all)
1403+
@_fixed_layout
14041404
public struct Words : RandomAccessCollection {
14051405
public typealias Indices = Range<Int>
14061406
public typealias SubSequence = Slice<${Self}.Words>
14071407

1408-
@usableFromInline // FIXME(sil-serialize-all)
1408+
@usableFromInline
14091409
internal var _value: ${Self}
14101410

1411-
@inlinable // FIXME(sil-serialize-all)
1411+
@inlinable
14121412
public init(_ value: ${Self}) {
14131413
self._value = value
14141414
}
14151415

1416-
@inlinable // FIXME(sil-serialize-all)
1416+
@inlinable
14171417
public var count: Int {
14181418
return (${bits} + ${word_bits} - 1) / ${word_bits}
14191419
}
14201420

1421-
@inlinable // FIXME(sil-serialize-all)
1421+
@inlinable
14221422
public var startIndex: Int { return 0 }
14231423

1424-
@inlinable // FIXME(sil-serialize-all)
1424+
@inlinable
14251425
public var endIndex: Int { return count }
14261426

1427-
@inlinable // FIXME(sil-serialize-all)
1427+
@inlinable
14281428
public var indices: Indices { return startIndex ..< endIndex }
14291429

14301430
@_transparent
@@ -1433,7 +1433,7 @@ ${assignmentOperatorComment(x.operator, True)}
14331433
@_transparent
14341434
public func index(before i: Int) -> Int { return i - 1 }
14351435

1436-
@inlinable // FIXME(sil-serialize-all)
1436+
@inlinable
14371437
public subscript(position: Int) -> UInt {
14381438
get {
14391439
_precondition(position >= 0, "Negative word index")
@@ -1530,7 +1530,7 @@ ${assignmentOperatorComment(x.operator, True)}
15301530
/// - Parameter other: The value to multiply this value by.
15311531
/// - Returns: A tuple containing the high and low parts of the result of
15321532
/// multiplying this value and `other`.
1533-
@inlinable // FIXME(sil-serialize-all)
1533+
@inlinable
15341534
public func multipliedFullWidth(by other: ${Self})
15351535
-> (high: ${Self}, low: ${Self}.Magnitude) {
15361536
// FIXME(integers): tests
@@ -1563,7 +1563,7 @@ ${assignmentOperatorComment(x.operator, True)}
15631563
/// sign, if the type is signed.
15641564
/// - Returns: A tuple containing the quotient and remainder of `dividend`
15651565
/// divided by this value.
1566-
@inlinable // FIXME(sil-serialize-all)
1566+
@inlinable
15671567
public func dividingFullWidth(
15681568
_ dividend: (high: ${Self}, low: ${Self}.Magnitude)
15691569
) -> (quotient: ${Self}, remainder: ${Self}) {
@@ -1632,17 +1632,14 @@ ${assignmentOperatorComment(x.operator, True)}
16321632
}
16331633
% end
16341634

1635-
@inlinable // FIXME(sil-serialize-all)
16361635
@available(swift, obsoleted: 4.0, message: "Use initializers instead")
16371636
public func to${U}IntMax() -> ${U}Int64 {
16381637
return numericCast(self)
16391638
}
16401639

1641-
@inlinable // FIXME(sil-serialize-all)
16421640
@available(swift, obsoleted: 4, message: "Use bitWidth instead.")
16431641
public static var _sizeInBits: ${Self} { return ${bits} }
16441642

1645-
@inlinable // FIXME(sil-serialize-all)
16461643
@available(swift, obsoleted: 4)
16471644
public static var _sizeInBytes: ${Self} { return ${bits}/8 }
16481645

@@ -1651,7 +1648,7 @@ ${assignmentOperatorComment(x.operator, True)}
16511648
///
16521649
/// - Returns: The sign of this number, expressed as an integer of the same
16531650
/// type.
1654-
@inlinable // FIXME(sil-serialize-all)
1651+
@inlinable
16551652
@inline(__always)
16561653
public func signum() -> ${Self} {
16571654
let isPositive = ${Self}(Builtin.zext_Int1_Int${bits}(
@@ -1708,7 +1705,6 @@ extension ${Self} {
17081705
///
17091706
/// - Parameter source: An integer to use as the source of the new value's
17101707
/// bit pattern.
1711-
@inlinable // FIXME(sil-serialize-all)
17121708
@available(swift, obsoleted: 4.0, renamed: "init(truncatingIfNeeded:)")
17131709
@_transparent
17141710
public init(truncatingBitPattern source: ${Src}) {
@@ -1746,7 +1742,6 @@ ${operatorComment(x.operator, True)}
17461742
% for op in maskingShifts:
17471743

17481744
${operatorComment(x.operator, True)}
1749-
@inlinable // FIXME(sil-serialize-all)
17501745
@available(swift, obsoleted: 4)
17511746
@_semantics("optimize.sil.specialize.generic.partial.never")
17521747
@_transparent
@@ -1759,7 +1754,6 @@ ${operatorComment(x.operator, True)}
17591754
}
17601755

17611756
${assignmentOperatorComment(x.operator, True)}
1762-
@inlinable // FIXME(sil-serialize-all)
17631757
@available(swift, obsoleted: 4)
17641758
@_semantics("optimize.sil.specialize.generic.partial.never")
17651759
@_transparent
@@ -1837,7 +1831,8 @@ extension Int {
18371831
}
18381832

18391833
// FIXME(integers): switch to using `FixedWidthInteger.unsafeAdding`
1840-
@inlinable // FIXME(sil-serialize-all)
1834+
@_transparent
1835+
@inlinable
18411836
internal func _unsafePlus(_ lhs: Int, _ rhs: Int) -> Int {
18421837
#if INTERNAL_CHECKS_ENABLED
18431838
return lhs + rhs
@@ -1847,7 +1842,8 @@ internal func _unsafePlus(_ lhs: Int, _ rhs: Int) -> Int {
18471842
}
18481843

18491844
// FIXME(integers): switch to using `FixedWidthInteger.unsafeSubtracting`
1850-
@inlinable // FIXME(sil-serialize-all)
1845+
@_transparent
1846+
@inlinable
18511847
internal func _unsafeMinus(_ lhs: Int, _ rhs: Int) -> Int {
18521848
#if INTERNAL_CHECKS_ENABLED
18531849
return lhs - rhs

stdlib/public/core/Integers.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2875,7 +2875,7 @@ extension FixedWidthInteger {
28752875
}
28762876

28772877
extension FixedWidthInteger {
2878-
@inlinable // FIXME(sil-serialize-all)
2878+
@inlinable
28792879
@_semantics("optimize.sil.specialize.generic.partial.never")
28802880
public // @testable
28812881
static func _convert<Source : BinaryFloatingPoint>(
@@ -2926,7 +2926,7 @@ extension FixedWidthInteger {
29262926
/// - Parameter source: A floating-point value to convert to an integer.
29272927
/// `source` must be representable in this type after rounding toward
29282928
/// zero.
2929-
@inlinable // FIXME(sil-serialize-all)
2929+
@inlinable
29302930
@_semantics("optimize.sil.specialize.generic.partial.never")
29312931
@inline(__always)
29322932
public init<T : BinaryFloatingPoint>(_ source: T) {

0 commit comments

Comments
 (0)