mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user