mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[stdlib] Rename _StringCore to _LegacyStringCore. NFC.
In grand LLVM tradition, the first step to redesigning _StringCore is to first rename it to _LegacyStringCore. Subsequent commits will introduce the replacement, and eventually all uses of the old one will be moved to the new one. NFC.
This commit is contained in:
committed by
Michael Ilseman
parent
0ccd5cca6a
commit
75463e30f3
@@ -65,7 +65,7 @@ extension String {
|
||||
{
|
||||
@_inlineable // FIXME(sil-serialize-all)
|
||||
@_versioned // FIXME(sil-serialize-all)
|
||||
internal init(_ _core: _StringCore, coreOffset: Int = 0) {
|
||||
internal init(_ _core: _LegacyStringCore, coreOffset: Int = 0) {
|
||||
self._core = _core
|
||||
self._coreOffset = coreOffset
|
||||
}
|
||||
@@ -74,12 +74,12 @@ extension String {
|
||||
@_versioned // FIXME(sil-serialize-all)
|
||||
internal struct _ScratchIterator : IteratorProtocol {
|
||||
@_versioned
|
||||
internal var core: _StringCore
|
||||
internal var core: _LegacyStringCore
|
||||
@_versioned // FIXME(sil-serialize-all)
|
||||
internal var idx: Int
|
||||
@_inlineable // FIXME(sil-serialize-all)
|
||||
@_versioned // FIXME(sil-serialize-all)
|
||||
internal init(_ core: _StringCore, _ pos: Int) {
|
||||
internal init(_ core: _LegacyStringCore, _ pos: Int) {
|
||||
self.idx = pos
|
||||
self.core = core
|
||||
}
|
||||
@@ -194,7 +194,7 @@ extension String {
|
||||
public struct Iterator : IteratorProtocol {
|
||||
@_inlineable // FIXME(sil-serialize-all)
|
||||
@_versioned // FIXME(sil-serialize-all)
|
||||
internal init(_ _base: _StringCore) {
|
||||
internal init(_ _base: _LegacyStringCore) {
|
||||
self._iterator = _base.makeIterator()
|
||||
if _base.hasContiguousStorage {
|
||||
self._baseSet = true
|
||||
@@ -261,7 +261,7 @@ extension String {
|
||||
@_versioned // FIXME(sil-serialize-all)
|
||||
internal var _base: UnsafeBufferPointer<UInt16>.Iterator!
|
||||
@_versioned // FIXME(sil-serialize-all)
|
||||
internal var _iterator: IndexingIterator<_StringCore>
|
||||
internal var _iterator: IndexingIterator<_LegacyStringCore>
|
||||
}
|
||||
|
||||
/// Returns an iterator over the Unicode scalars that make up this view.
|
||||
@@ -283,10 +283,10 @@ extension String {
|
||||
}
|
||||
|
||||
@_versioned // FIXME(sil-serialize-all)
|
||||
internal var _core: _StringCore
|
||||
internal var _core: _LegacyStringCore
|
||||
|
||||
/// The offset of this view's `_core` from an original core. This works
|
||||
/// around the fact that `_StringCore` is always zero-indexed.
|
||||
/// around the fact that `_LegacyStringCore` is always zero-indexed.
|
||||
/// `_coreOffset` should be subtracted from `UnicodeScalarIndex.encodedOffset`
|
||||
/// before that value is used as a `_core` index.
|
||||
@_versioned // FIXME(sil-serialize-all)
|
||||
@@ -342,7 +342,7 @@ extension String.UnicodeScalarView : RangeReplaceableCollection {
|
||||
/// Creates an empty view instance.
|
||||
@_inlineable // FIXME(sil-serialize-all)
|
||||
public init() {
|
||||
self = String.UnicodeScalarView(_StringCore())
|
||||
self = String.UnicodeScalarView(_LegacyStringCore())
|
||||
}
|
||||
|
||||
/// Reserves enough space in the view's underlying storage to store the
|
||||
|
||||
Reference in New Issue
Block a user