Karoy Lorentey
381cf5d17e
Merge branch 'release/1.0' into release/1.1
2022-10-19 15:50:34 -07:00
Karoy Lorentey
f76630db8e
[Internals] Add missing internal checking predicates & docs for all
2022-10-18 22:13:19 -07:00
Karoy Lorentey
51604cd196
[OrderedCollections] Oops, restore custom wording for areInIncreasingOrder variants
2022-10-12 15:11:57 -07:00
Karoy Lorentey
a624614717
[OrderedCollections] Document that sort is stable (as of SE-0372)
2022-10-11 13:38:10 -07:00
Karoy Lorentey
17b6c8f5c7
[OrderedDictionary] OrderedDictionary, .Iterator, .Values, .Elements, .Elements.SubSequence, .Elements.SubSequence.Iterator: Explicitly conform to Sendable when Element is Sendable
2022-10-05 11:44:06 -07:00
Karoy Lorentey
de31437ee5
Merge branch 'feature/PersistentCollections' into release/1.1
2022-09-19 16:02:51 -07:00
Karoy Lorentey
9f38e7424b
[OrderedDictionary] Doc fix
2022-09-16 16:07:33 -07:00
Karoy Lorentey
c9ca59fbb9
[PersistentCollections] Improved storage representation
...
- Switch to using `ManagedBuffer` to represent node storage. This has
useful performance benefits, but it significantly complicates access
to node data. We no longer have direct access to the underlying raw
storage: everything needs to go through closures passed to
`ManagedBuffer.withUnsafeMutablePointers`.
- Introduce `struct _Node` and `struct _Node.UnsafeHandle` to
represent a (strong) reference to a hash tree node, and a
convenient handle for node storage, respectively. Use these instead
of directly accessing the ManagedBuffer object, whenever feasible.
- Implement separate paths for in-place mutations vs copy-on-write
operation, optimizing both flavors.
- Go to great lengths to eliminate unnecessary retain-release traffic,
whenever possible.
- Push subtree counts into parent nodes by moving the corresponding
field from the node header into the `_Node` struct. (This results in
a cool ~20x speedup for jumping around in the tree by integer
offsets.)
- Implement a type-punned empty root singleton, to allow creating
empty trees without allocating anything.
2022-09-13 23:48:54 -07:00
Karoy Lorentey
77edbef16d
[_CollectionsUtilities] Restore original debug descriptions
2022-09-13 23:45:22 -07:00
Karoy Lorentey
dd76591970
[_CollectionsUtilities] New module. Use it to unify description/debugDescription implementations
2022-09-12 12:47:04 -07:00
Karoy Lorentey
a9e2276472
Merge pull request #168 from lorentey/cherry-pick-1.0.3
...
Cherry pick recent fixes to release/1.0 in preparation of tagging 1.0.3
2022-09-01 17:21:25 -07:00
Karoy Lorentey
71aa4a39ae
[OrderedDictionary] Resolve spurious(?) call-site ambiguities
2022-08-31 17:57:24 -07:00
Karoy Lorentey
b379fa7aee
[OrderedCollections] Force-inline all _modify accessors
...
(cherry picked from commit ee1b2de06e )
2022-08-31 17:13:53 -07:00
Karoy Lorentey
6cb037037d
[OrderedDictionary][doc] Update docs for merge/filter operations
...
Resolves #145
2022-05-23 16:17:35 -07:00
Karoy Lorentey
50e6a1ac71
[OrderedDictionary] Fix type inference issue with OrderedDictionary.init(grouping:by:)
...
This adds a new overload to help the type checker infer `[S.Element]` as the default `Value` type.
Resolves #139 .
2022-02-08 14:16:18 -08:00
Karoy Lorentey
e959a64528
[OrderedDictionary] Add some more _checkInvariants() calls
2021-09-08 21:12:52 -07:00
Karoy Lorentey
9d4bb8cdf8
[OrderedDictionary] Remove deprecated API
...
Mark the deprecated `subscript(offset:)` and `modifyValue(...)` APIs unavailable and replace their bodies with fatalError().
2021-09-03 19:11:29 -07:00
ejmarchant
4c22d00065
Follow stdlib's leading underscore rule ( #95 )
2021-08-30 15:44:27 -07:00
Edward Marchant
751ae1b08b
Documentation: Remove in-place mutation comments
2021-08-30 15:44:27 -07:00
Karoy Lorentey
9d8719c8be
[OrderedDictionary] Deprecate subscript(offset:) for now ( #92 )
...
* [OrderedDictionary] Deprecate index(forKey:), subscript(offset:) and friends for now
* [OrderedDictionary] Update tests
* Update benchmarks
* Un-deprecate index(forKey:)
2021-08-19 19:26:41 -07:00
Karoy Lorentey
1e68069c98
[OrderedDictionary] modifyValue → updateValue ( #91 )
...
* [OrderedDictionary] modifyValue → updateValue
* Update CMakeLists.txt
2021-08-19 19:26:41 -07:00
ejmarchant
5ff8c003b0
Fix documentation for types conforming to ExpressibleByArrayLiteral or ExpressibleByDictionaryLiteral ( #82 )
...
# Conflicts:
# Sources/PriorityQueueModule/Heap+ExpressibleByArrayLiteral.swift
2021-08-19 19:26:41 -07:00
ejmarchant
85a207063b
Fix typos: missing subscript parameters ( #81 )
...
* Fix typos: missing subscript parameters
* Fix typos: more missing subscript parameters
* Improve symbol documentation
2021-08-19 19:26:41 -07:00
Vihan
2aeaac76ae
Update invalid OrderedDictionary invariant check. ( #53 )
2021-06-10 10:54:34 -07:00
François Lamboley
f6d8f82627
Replace Index with Int where possible ( #32 )
2021-05-10 16:36:10 -07:00
Karoy Lorentey
65a38419d0
[OrderedDictionary] Document encoding format ( #26 )
...
Unlike the regular unordered `Dictionary`, `OrderedDictionary` always encodes/decodes itself as alternating key/value pairs in an unkeyed container. Document this fact (and the reason behind it) in the `Decodable` implementation.
2021-04-16 15:59:00 -07:00
Franklin Byaruhanga
b68a025e23
Minor Fix in documentation for function OrderedDictionary.updateValue
...
Signed-off-by: Franklin Byaruhanga <byaruhaf@appbantu.com >
2021-04-06 16:46:04 -07:00
Karoy Lorentey
a2bcac435f
Initial import.
...
Introduce OrderedCollections module
2021-04-05 09:41:00 -07:00