Skip to content

Commit 0f78872

Browse files
authored
Merge pull request swiftlang#10096 from swiftix/inliner-improvements2
Reduce code size of the stdlib
2 parents a7563fa + ecff16c commit 0f78872

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

stdlib/public/core/IntegerParsing.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ extension FixedWidthInteger {
8787
// _parseASCII function thunk that prevents inlining used as an implementation
8888
// detail for FixedWidthInteger.init(_: radix:) on the slow path to save code
8989
// size.
90+
@_semantics("optimize.sil.specialize.generic.partial.never")
9091
@inline(never)
9192
internal static func _parseASCIISlowPath<
9293
CodeUnits : IteratorProtocol, Result: FixedWidthInteger
@@ -129,6 +130,7 @@ extension FixedWidthInteger {
129130
/// `radix`.
130131
/// - radix: The radix, or base, to use for converting `text` to an integer
131132
/// value. `radix` must be in the range `2...36`. The default is 10.
133+
@_semantics("optimize.sil.specialize.generic.partial.never")
132134
public init?/*<S : StringProtocol>*/(_ text: String, radix: Int = 10) {
133135
_precondition(2...36 ~= radix, "Radix not in range 2...36")
134136
let r = Self(radix)

stdlib/public/core/String.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,7 @@ where Source.Iterator.Element == SourceEncoding.CodeUnit {
169169
encodedAs: sourceEncoding) { p, _ in try body(p) }
170170
}
171171

172+
@_semantics("optimize.sil.specialize.generic.partial.never")
172173
internal func _withCStringAndLength<
173174
Source : Collection,
174175
SourceEncoding : Unicode.Encoding,

0 commit comments

Comments
 (0)