Karoy Lorentey
d07dc32dfa
Sources: Add unsafe keywords where needed
2026-10-01 11:14:29 -07:00
Karoy Lorentey
1c69635852
Add SPDX-License-Identifier tags
2026-03-05 19:39:24 -08:00
Karoy Lorentey
d9b09ecde8
Update copyright dates
2026-03-05 19:39:20 -08:00
Karoy Lorentey
9503f8fe57
Improve consistency of precondition failure messages
...
More uniform message strings should feel better, and they should ever so slightly reduce code size.
2026-02-04 10:27:17 -08:00
Karoy Lorentey
ffa4a58bc1
Update remaining copyright notices
2024-02-02 16:20:22 -08:00
Karoy Lorentey
1925ed3001
[Rope] update(at:by:): Invalidate indices
...
Calling this function is supposed to invalidate all indices other than
the input index — so let’s do that.
2023-04-12 17:55:19 -07:00
Karoy Lorentey
cead2b3d64
[Rope] index(_:offsetBy:in:preferEnd:) fix result tuple labeling
...
This renames `remainder` to `remaining`, restoring API consistency.
2023-04-12 17:54:13 -07:00
Karoy Lorentey
bc21b90ff1
[Rope] Minor usability fixes and API additions
2023-04-12 17:53:04 -07:00
Karoy Lorentey
454c84b5e4
Make most of Rope inlinable
2023-04-10 16:56:30 -07:00
Karoy Lorentey
6f3f19d1c5
_Rope → Rope
2023-03-20 23:49:57 -07:00
Karoy Lorentey
b022b7fee5
Make _BString and _Rope public
2023-03-20 18:36:37 -07:00
Karoy Lorentey
605e45b9b9
_BString: Additional fixes and new functionality
...
- New methods for rounding up indices
- Sendable conformances
- Fix UTF-16 strings sometimes leaking into chunks
- Iterator improvements / rewrites, incl. a chunked UTF-8
buffer iterator.
- Support for comparing and hashing UTF-8 slices.
2023-03-20 13:12:10 -07:00
Karoy Lorentey
79bdcb66eb
Implement path caching in indices
2023-03-20 13:12:10 -07:00
Karoy Lorentey
575937f6ff
Remove _Rope._leaf(at:)
2023-03-20 13:12:09 -07:00
Karoy Lorentey
b6f9d83c60
Replace Rope iterator with indices in most index-like use cases
2023-03-20 13:12:09 -07:00
Karoy Lorentey
3cc5a3888a
_Rope: Add a leaf node reference to indices. Implement explicit index invalidation
2023-03-20 13:12:09 -07:00
Karoy Lorentey
8c1740ad28
_Rope.Index: Merge height into UInt64 storage.
...
This leaves 56 bits for path data, which should still be plenty.
(We want to allow big strings to grow to 2^48 UTF-8 code units, to
match the standard String; however, there is no practical need to
support any more, and even that is a stretch.)
Add tests to verify that the tree capacity matches expectations
in Release builds. (In Debug builds, we limit the maximum node size,
which drastically reduces capacity. This is okay.)
2023-03-20 13:12:09 -07:00
Karoy Lorentey
18aa309f75
Generalize some _BString iterators
2023-03-20 13:12:07 -07:00
Karoy Lorentey
150a165d73
Add experimental rope implementation
2023-03-20 13:11:21 -07:00