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.
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 https://github.com/tc39/proposal-joint-iteration/pull/20 lands.An alternative to replacing elements of
_iters_
withnull
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.