mirror of
https://github.com/apple/swift-collections
synced 2026-11-30 05:18:44 +00:00
Merge pull request #318 from lorentey/enable-stable-ropes
[RopeModule] Fix issues in Swift's ABI stable dialect
This commit is contained in:
6 files changed
+8
No files matched your search
@@ -14,6 +14,7 @@ import _CollectionsUtilities // for 5.8 polyfills
|
||||
#endif
|
||||
|
||||
extension Rope {
|
||||
@frozen // Not really! This module isn't ABI stable.
|
||||
@usableFromInline
|
||||
internal struct _Node: _RopeItem {
|
||||
@usableFromInline internal typealias Element = Rope.Element
|
||||
@@ -550,6 +551,7 @@ extension Rope._Node {
|
||||
}
|
||||
}
|
||||
|
||||
@frozen // Not really! This module isn't ABI stable.
|
||||
@usableFromInline
|
||||
internal struct _ModifyState {
|
||||
@usableFromInline internal var path: _Path
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
@usableFromInline
|
||||
@frozen // Not really! This module isn't ABI stable.
|
||||
internal struct _RopeStorageHeader {
|
||||
@usableFromInline var _childCount: UInt16
|
||||
@usableFromInline let height: UInt8
|
||||
@@ -33,6 +34,7 @@ internal struct _RopeStorageHeader {
|
||||
|
||||
extension Rope {
|
||||
@usableFromInline
|
||||
@_fixed_layout // Not really! This module isn't ABI stable.
|
||||
internal final class _Storage<Child: _RopeItem<Summary>>:
|
||||
ManagedBuffer<_RopeStorageHeader, Child>
|
||||
{
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
extension Rope {
|
||||
@frozen // Not really! This module isn't ABI stable.
|
||||
@usableFromInline
|
||||
internal struct _UnmanagedLeaf {
|
||||
@usableFromInline internal typealias _Item = Rope._Item
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
|
||||
extension Rope {
|
||||
@usableFromInline
|
||||
@frozen // Not really! This module isn't ABI stable.
|
||||
internal struct _UnsafeHandle<Child: _RopeItem<Summary>> {
|
||||
@usableFromInline internal typealias Summary = Rope.Summary
|
||||
@usableFromInline internal typealias Element = Rope.Element
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
/// An ordered data structure of `Element` values that organizes itself into a tree.
|
||||
/// The rope is augmented by the commutative group specified by `Element.Summary`, enabling
|
||||
/// quick lookup operations.
|
||||
@frozen // Not really! This module isn't ABI stable.
|
||||
public struct Rope<Element: RopeElement> {
|
||||
@usableFromInline
|
||||
internal var _root: _Node?
|
||||
|
||||
@@ -42,6 +42,7 @@ extension Rope {
|
||||
/// A trivial wrapper around a rope's Element type, giving it `_RopeItem` conformance without
|
||||
/// having to make the protocol public.
|
||||
@usableFromInline
|
||||
@frozen // Not really! This module isn't ABI stable.
|
||||
internal struct _Item {
|
||||
@usableFromInline internal var value: Element
|
||||
|
||||
|
||||
Reference in new issue
Block a user