From d4c0e3ccc512680982454e0051baa5dcf5cb8b84 Mon Sep 17 00:00:00 2001 From: Michael Ficarra Date: Tue, 17 Sep 2024 18:42:27 -0600 Subject: [PATCH] the AC passed to CreateIteratorFromClosure should return completions --- spec.html | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/spec.html b/spec.html index 29c22de45f..4f5181b3b0 100644 --- a/spec.html +++ b/spec.html @@ -46760,10 +46760,10 @@

Iterator.prototype.drop ( _limit_ )

1. If _remaining_ ≠ +∞, then 1. Set _remaining_ to _remaining_ - 1. 1. Let _next_ be ? IteratorStep(_iterated_). - 1. If _next_ is ~done~, return ~unused~. + 1. If _next_ is ~done~, return NormalCompletion(~unused~). 1. Repeat, 1. Let _value_ be ? IteratorStepValue(_iterated_). - 1. If _value_ is ~done~, return ~unused~. + 1. If _value_ is ~done~, return NormalCompletion(~unused~). 1. Let _completion_ be Completion(Yield(_value_)). 1. IfAbruptCloseIterator(_completion_, _iterated_). 1. Let _result_ be CreateIteratorFromClosure(_closure_, *"Iterator Helper"*, %IteratorHelperPrototype%, « [[UnderlyingIterator]] »). @@ -46803,7 +46803,7 @@

Iterator.prototype.filter ( _predicate_ )

1. Let _counter_ be 0. 1. Repeat, 1. Let _value_ be ? IteratorStepValue(_iterated_). - 1. If _value_ is ~done~, return ~unused~. + 1. If _value_ is ~done~, return NormalCompletion(~unused~). 1. Let _selected_ be Completion(Call(_predicate_, *undefined*, « _value_, 𝔽(_counter_) »)). 1. IfAbruptCloseIterator(_selected_, _iterated_). 1. If ToBoolean(_selected_) is *true*, then @@ -46847,7 +46847,7 @@

Iterator.prototype.flatMap ( _mapper_ )

1. Let _counter_ be 0. 1. Repeat, 1. Let _value_ be ? IteratorStepValue(_iterated_). - 1. If _value_ is ~done~, return ~unused~. + 1. If _value_ is ~done~, return NormalCompletion(~unused~). 1. Let _mapped_ be Completion(Call(_mapper_, *undefined*, « _value_, 𝔽(_counter_) »)). 1. IfAbruptCloseIterator(_mapped_, _iterated_). 1. Let _innerIterator_ be Completion(GetIteratorFlattenable(_mapped_, ~reject-primitives~)). @@ -46901,7 +46901,7 @@

Iterator.prototype.map ( _mapper_ )

1. Let _counter_ be 0. 1. Repeat, 1. Let _value_ be ? IteratorStepValue(_iterated_). - 1. If _value_ is ~done~, return ~unused~. + 1. If _value_ is ~done~, return NormalCompletion(~unused~). 1. Let _mapped_ be Completion(Call(_mapper_, *undefined*, « _value_, 𝔽(_counter_) »)). 1. IfAbruptCloseIterator(_mapped_, _iterated_). 1. Let _completion_ be Completion(Yield(_mapped_)). @@ -46976,7 +46976,7 @@

Iterator.prototype.take ( _limit_ )

1. If _remaining_ ≠ +∞, then 1. Set _remaining_ to _remaining_ - 1. 1. Let _value_ be ? IteratorStepValue(_iterated_). - 1. If _value_ is ~done~, return ~unused~. + 1. If _value_ is ~done~, return NormalCompletion(~unused~). 1. Let _completion_ be Completion(Yield(_value_)). 1. IfAbruptCloseIterator(_completion_, _iterated_). 1. Let _result_ be CreateIteratorFromClosure(_closure_, *"Iterator Helper"*, %IteratorHelperPrototype%, « [[UnderlyingIterator]] »).