[Unicode] Publish Unicode ABI

De-genericize one axis of storage buffers to speed up compilation time
of stdlib and user code. Publish the rest as ABI, since we're out of
time to reevaluate the design.
This commit is contained in:
Michael Ilseman
2018-11-15 11:03:08 -08:00
parent c749123297
commit cd35876fa5
10 changed files with 160 additions and 165 deletions

View File

@@ -62,10 +62,10 @@ public protocol _UnicodeEncoding {
extension _UnicodeEncoding {
// See note on declaration of requirement, above
@inlinable // FIXME(sil-serialize-all)
@inlinable
public static func _isScalar(_ x: CodeUnit) -> Bool { return false }
@inlinable // FIXME(sil-serialize-all)
@inlinable
public static func transcode<FromEncoding : Unicode.Encoding>(
_ content: FromEncoding.EncodedScalar, from _: FromEncoding.Type
) -> EncodedScalar? {
@@ -75,7 +75,7 @@ extension _UnicodeEncoding {
/// Converts from encoding-independent to encoded representation, returning
/// `encodedReplacementCharacter` if the scalar can't be represented in this
/// encoding.
@inlinable // FIXME(sil-serialize-all)
@inlinable
internal static func _encode(_ content: Unicode.Scalar) -> EncodedScalar {
return encode(content) ?? encodedReplacementCharacter
}
@@ -83,7 +83,7 @@ extension _UnicodeEncoding {
/// Converts a scalar from another encoding's representation, returning
/// `encodedReplacementCharacter` if the scalar can't be represented in this
/// encoding.
@inlinable // FIXME(sil-serialize-all)
@inlinable
internal static func _transcode<FromEncoding : Unicode.Encoding>(
_ content: FromEncoding.EncodedScalar, from _: FromEncoding.Type
) -> EncodedScalar {
@@ -91,7 +91,7 @@ extension _UnicodeEncoding {
?? encodedReplacementCharacter
}
@inlinable // FIXME(sil-serialize-all)
@inlinable
internal static func _transcode<
Source: Sequence, SourceEncoding: Unicode.Encoding>(
_ source: Source,