mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[string] Drop StringStorage.create inlinability annotation.
StringStorage.create is the primary means of allocating storage for a string, so drop inlinability to allow for future evolution. StringStorage also exposes some .appendInPlace methods, which we currently need to keep inlinable for benchmark performance. We'd really like to drop inlinability for these for evolution purposes (e.g. imagine a future version that adjusts nul-termination or changes in coordination with create). These are flagged with: ` // TODO(inlinability): @usableFromInline - P3` Where "P3" reflects urgency on a scale from 1 (stop the presses) to 5 (whatevs).
This commit is contained in:
committed by
Michael Ilseman
parent
715003c206
commit
c00a460ea3
@@ -637,10 +637,9 @@ extension _StringGuts {
|
||||
return _copyToNativeStorage(of: CodeUnit.self, from: 0..<count)
|
||||
}
|
||||
|
||||
@inlinable
|
||||
@_specialize(where CodeUnit == UInt8)
|
||||
@_specialize(where CodeUnit == UInt16)
|
||||
@_specialize(where CodeUnit == UTF16.CodeUnit)
|
||||
@inlinable
|
||||
internal
|
||||
func _copyToNativeStorage<CodeUnit>(
|
||||
of codeUnit: CodeUnit.Type = CodeUnit.self,
|
||||
|
||||
Reference in New Issue
Block a user