[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:
Michael Ilseman
2018-04-27 14:30:13 -07:00
committed by Michael Ilseman
parent 715003c206
commit c00a460ea3
2 changed files with 8 additions and 7 deletions

View File

@@ -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,