Skip to content

Conversation

@lorentey
Copy link
Member

This is mostly about internal cleanups, including a revision of _Node.Builder semantics, and some work on simplification/unification of removals. I'm still a bit unhappy about the implementation differences between the in-place mutating and copy-returning variants, but this does make things a little bit better.

Checklist

  • I've read the Contribution Guidelines
  • My contributions are licensed under the Swift license.
  • I've followed the coding style of the rest of the project.
  • I've added tests covering all new code paths my change adds to the project (if appropriate).
  • I've added benchmarks covering new functionality (if appropriate).
  • I've verified that my change does not break any existing tests or introduce unexplained benchmark regressions.
  • I've updated the documentation if necessary.

This sanitizes the semantics of _Node.Builder, removing
the (unneccessary) need to pass around hash paths.

It also slightly refactors removal operations, but stops short of
implementing node shrinking.

# Conflicts:
#	Sources/PersistentCollections/Node/_Node+Builder.swift
#	Sources/PersistentCollections/Node/_Node+Initializers.swift
#	Sources/PersistentCollections/Node/_Node+Structural intersection.swift
#	Sources/PersistentCollections/Node/_Node+Structural subtracting.swift
#	Sources/PersistentCollections/Node/_Node+Subtree Modify.swift
#	Sources/PersistentCollections/Node/_Node+Subtree Removals.swift
#	Sources/PersistentCollections/PersistentDictionary/PersistentDictionary+Initializers.swift
#	Sources/PersistentCollections/PersistentSet/PersistentSet+SetAlgebra Initializers.swift
#	Sources/PersistentCollections/PersistentSet/PersistentSet+SetAlgebra intersection.swift
#	Sources/PersistentCollections/PersistentSet/PersistentSet+SetAlgebra subtracting.swift
# Conflicts:
#	Sources/PersistentCollections/Node/_Node+Primitive Removals.swift
@lorentey lorentey requested a review from msteindorfer October 12, 2022 22:03
@lorentey
Copy link
Member Author

@swift-ci test

@lorentey
Copy link
Member Author

@swift-ci test

Copy link
Contributor

@msteindorfer msteindorfer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lorentey lorentey merged commit 2385847 into apple:main Oct 14, 2022
@lorentey lorentey deleted the PersistentCollections-updates3 branch October 14, 2022 17:23
@lorentey lorentey added this to the 1.1.0 milestone Oct 14, 2022
@lorentey lorentey added the HashTreeCollections Hash-array mapped prefix tree implementations label Nov 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

HashTreeCollections Hash-array mapped prefix tree implementations

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants