Skip to content

Commit

Permalink
the AC passed to CreateIteratorFromClosure should return completions
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelficarra committed Sep 23, 2024
1 parent 48fd369 commit d4c0e3c
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -46760,10 +46760,10 @@ <h1>Iterator.prototype.drop ( _limit_ )</h1>
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]] »).
Expand Down Expand Up @@ -46803,7 +46803,7 @@ <h1>Iterator.prototype.filter ( _predicate_ )</h1>
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
Expand Down Expand Up @@ -46847,7 +46847,7 @@ <h1>Iterator.prototype.flatMap ( _mapper_ )</h1>
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~)).
Expand Down Expand Up @@ -46901,7 +46901,7 @@ <h1>Iterator.prototype.map ( _mapper_ )</h1>
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_)).
Expand Down Expand Up @@ -46976,7 +46976,7 @@ <h1>Iterator.prototype.take ( _limit_ )</h1>
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]] »).
Expand Down

0 comments on commit d4c0e3c

Please sign in to comment.