Skip to content

Commit

Permalink
return ~empty~ from closures passed to GeneratorStart
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelficarra committed Sep 4, 2024
1 parent 6f6e260 commit 2255ce1
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 @@ -46709,10 +46709,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 *undefined*.
1. If _next_ is ~done~, return ~empty~.
1. Repeat,
1. Let _value_ be ? IteratorStepValue(_iterated_).
1. If _value_ is ~done~, return *undefined*.
1. If _value_ is ~done~, return ~empty~.
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 @@ -46752,7 +46752,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 *undefined*.
1. If _value_ is ~done~, return ~empty~.
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 @@ -46796,7 +46796,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 *undefined*.
1. If _value_ is ~done~, return ~empty~.
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 @@ -46850,7 +46850,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 *undefined*.
1. If _value_ is ~done~, return ~empty~.
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 @@ -46925,7 +46925,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 *undefined*.
1. If _value_ is ~done~, return ~empty~.
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 2255ce1

Please sign in to comment.