Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clarify iterator lists #21

Merged
merged 2 commits into from
Apr 17, 2024
Merged

clarify iterator lists #21

merged 2 commits into from
Apr 17, 2024

Conversation

bakkot
Copy link
Collaborator

@bakkot bakkot commented Apr 5, 2024

Revisiting this I found some parts confusing, so I've tweaked it a bit to clarify.

The Assert: _openIters_ is not empty. step won't be true until after #20 lands.

An alternative to replacing elements of _iters_ with null and tracking _openIters_ as separate list could be to just rely on the [[Done]] field of Iterator Records. That would require updating IteratorCloseAll to filter out the [[Done]]: true ones, though.

Copy link
Member

@michaelficarra michaelficarra left a comment

Choose a reason for hiding this comment

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

I think we can actually just delete any openIters usage outside of IteratorZipCore. It doesn't diverge from iters until there.

@bakkot
Copy link
Collaborator Author

bakkot commented Apr 17, 2024

Nice, done.

@michaelficarra michaelficarra merged commit 4456e1c into tc39:main Apr 17, 2024
1 check passed
@bakkot bakkot deleted the open-iters branch April 17, 2024 21:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants