The diffing implementation traffics in CollectionDifference elements,
which are availability gated. This adds the correct availability for
those APIs.
rdar://161010205
The pass that tracks which control-flow positions are unreachable after
infinite loops was migrated to pure Swift in PR #79186. As a result, the
C++-only compiler used to bootstrap is unable to determine that the
code-location after loops is unreachable. Placing a fatalError after the
infinite while loop.
Fixes: rdar://160956325
This changes the implementation for `Collection.difference(from:)` to
use a linear-space complexity variation of the same Myers algorithm. The
new version is similar in execution time to the existing one, but should
alleviate memory pressure when diffing collections where the number of
differences approaches the size of the collection. While the new
algorithm returns a set of changes that is the same size as the previous
version, the specific changes are not guaranteed to be the same.
rdar://155829876
- Add an underscore to private/internal symbols
- Make access levels explicit, even when they’re implied from context
- Conform to max line length of 80 characters
- Conformances declared on separate extensions that implement them
- Arrange member declarations so that stored properties appear first
- Expand single-letter function and type parameter names where there is an obvious name that’s more descriptive
- RangeReplaceableCollection.fastApplicationEnumeration → CollectionDifference._fastEnumeratedApply