Skip to content

Commit 166d0fa

Browse files
FloatingPoint.radix should be transparent. (swiftlang#25789)
* FloatingPoint.radix should be inlinable. * Switch transparent to inlinable+inline(__always).
1 parent 57a0c9f commit 166d0fa

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

stdlib/public/core/FloatingPoint.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2031,6 +2031,7 @@ extension BinaryFloatingPoint {
20312031
/// following formula, where `**` is exponentiation:
20322032
///
20332033
/// let magnitude = x.significand * F.radix ** x.exponent
2034+
@inlinable @inline(__always)
20342035
public static var radix: Int { return 2 }
20352036

20362037
/// Creates a new floating-point value using the sign of one value and the

stdlib/public/core/Integers.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ public extension AdditiveArithmetic where Self : ExpressibleByIntegerLiteral {
133133
///
134134
/// Zero is the identity element for addition. For any value,
135135
/// `x + .zero == x` and `.zero + x == x`.
136-
@_transparent
136+
@inlinable @inline(__always)
137137
static var zero: Self {
138138
return 0
139139
}

0 commit comments

Comments
 (0)