onflow / atree

Atree provides scalable arrays and scalable ordered maps.
https://onflow.org
Apache License 2.0
40 stars 16 forks source link

Add ReadOnly iterators and refactor other iterators #329

Closed fxamacker closed 1 year ago

fxamacker commented 1 year ago

Updates #292

Changes:

For ReadOnly iterators, the caller is responsible for preventing changes to child containers during iteration because mutations of child containers are not guaranteed to persist.

For non-ReadOnly iterators, two additional parameters are needed to update child container in parent map when child container is modified.


turbolent commented 1 year ago

@fxamacker Could you please open a tech-debt follow-up issue in the Cadence repo, so that we don't forget to switch Cadence to the new read-only versions where possible?

fxamacker commented 1 year ago

I'm replacing this PR with a new one that supports mutation of values from non-readonly iterators. The replacement PR will also include the atree inlining changes from PR #342.

A followup issue will also be opened in onflow/cadence repo.

fxamacker commented 1 year ago

This PR is replaced by PR #345