WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit ceb5a30

Browse files
Editorial: replace [[UnderlyingIterator]] with [[UnderlyingIterators]]
1 parent ce9c72d commit ceb5a30

File tree

1 file changed

+30
-12
lines changed

1 file changed

+30
-12
lines changed

spec.html

Lines changed: 30 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7185,6 +7185,24 @@ <h1>
71857185
</emu-alg>
71867186
</emu-clause>
71877187

7188+
<emu-clause id="sec-iteratorcloseall" type="abstract operation">
7189+
<h1>
7190+
IteratorCloseAll (
7191+
_iters_: a List of Iterator Records,
7192+
_completion_: a Completion Record,
7193+
): a Completion Record
7194+
</h1>
7195+
<dl class="header">
7196+
<dt>skip global checks</dt>
7197+
<dd>true</dd>
7198+
</dl>
7199+
<emu-alg>
7200+
1. For each element _iter_ of _iters_, in reverse List order, do
7201+
1. Set _completion_ to Completion(IteratorClose(_iter_, _completion_)).
7202+
1. Return ? _completion_.
7203+
</emu-alg>
7204+
</emu-clause>
7205+
71887206
<emu-clause id="sec-ifabruptcloseiterator" aoid="IfAbruptCloseIterator">
71897207
<h1>IfAbruptCloseIterator ( _value_, _iteratorRecord_ )</h1>
71907208
<p>IfAbruptCloseIterator is a shorthand for a sequence of algorithm steps that use an Iterator Record. An algorithm step of the form:</p>
@@ -48018,12 +48036,12 @@ <h1>%IteratorHelperPrototype%.next ( )</h1>
4801848036
<h1>%IteratorHelperPrototype%.return ( )</h1>
4801948037
<emu-alg>
4802048038
1. Let _O_ be *this* value.
48021-
1. Perform ? RequireInternalSlot(_O_, [[UnderlyingIterator]]).
48039+
1. Perform ? RequireInternalSlot(_O_, [[UnderlyingIterators]]).
4802248040
1. Assert: _O_ has a [[GeneratorState]] internal slot.
4802348041
1. If _O_.[[GeneratorState]] is ~suspended-start~, then
4802448042
1. Set _O_.[[GeneratorState]] to ~completed~.
4802548043
1. NOTE: Once a generator enters the completed state it never leaves it and its associated execution context is never resumed. Any execution state associated with _O_ can be discarded at this point.
48026-
1. Perform ? IteratorClose(_O_.[[UnderlyingIterator]], NormalCompletion(~unused~)).
48044+
1. Perform ? IteratorCloseAll(_O_.[[UnderlyingIterators]], NormalCompletion(~unused~)).
4802748045
1. Return CreateIteratorResultObject(*undefined*, *true*).
4802848046
1. Let _C_ be ReturnCompletion(*undefined*).
4802948047
1. Return ? GeneratorResumeAbrupt(_O_, _C_, *"Iterator Helper"*).
@@ -48190,8 +48208,8 @@ <h1>Iterator.prototype.drop ( _limit_ )</h1>
4819048208
1. If _value_ is ~done~, return ReturnCompletion(*undefined*).
4819148209
1. Let _completion_ be Completion(Yield(_value_)).
4819248210
1. IfAbruptCloseIterator(_completion_, _iterated_).
48193-
1. Let _result_ be CreateIteratorFromClosure(_closure_, *"Iterator Helper"*, %IteratorHelperPrototype%, « [[UnderlyingIterator]] »).
48194-
1. Set _result_.[[UnderlyingIterator]] to _iterated_.
48211+
1. Let _result_ be CreateIteratorFromClosure(_closure_, *"Iterator Helper"*, %IteratorHelperPrototype%, « [[UnderlyingIterators]] »).
48212+
1. Set _result_.[[UnderlyingIterators]] to « _iterated_ ».
4819548213
1. Return _result_.
4819648214
</emu-alg>
4819748215
</emu-clause>
@@ -48240,8 +48258,8 @@ <h1>Iterator.prototype.filter ( _predicate_ )</h1>
4824048258
1. Let _completion_ be Completion(Yield(_value_)).
4824148259
1. IfAbruptCloseIterator(_completion_, _iterated_).
4824248260
1. Set _counter_ to _counter_ + 1.
48243-
1. Let _result_ be CreateIteratorFromClosure(_closure_, *"Iterator Helper"*, %IteratorHelperPrototype%, « [[UnderlyingIterator]] »).
48244-
1. Set _result_.[[UnderlyingIterator]] to _iterated_.
48261+
1. Let _result_ be CreateIteratorFromClosure(_closure_, *"Iterator Helper"*, %IteratorHelperPrototype%, « [[UnderlyingIterators]] »).
48262+
1. Set _result_.[[UnderlyingIterators]] to « _iterated_ ».
4824548263
1. Return _result_.
4824648264
</emu-alg>
4824748265
</emu-clause>
@@ -48301,8 +48319,8 @@ <h1>Iterator.prototype.flatMap ( _mapper_ )</h1>
4830148319
1. IfAbruptCloseIterator(_backupCompletion_, _iterated_).
4830248320
1. Return ? IteratorClose(_iterated_, _completion_).
4830348321
1. Set _counter_ to _counter_ + 1.
48304-
1. Let _result_ be CreateIteratorFromClosure(_closure_, *"Iterator Helper"*, %IteratorHelperPrototype%, « [[UnderlyingIterator]] »).
48305-
1. Set _result_.[[UnderlyingIterator]] to _iterated_.
48322+
1. Let _result_ be CreateIteratorFromClosure(_closure_, *"Iterator Helper"*, %IteratorHelperPrototype%, « [[UnderlyingIterators]] »).
48323+
1. Set _result_.[[UnderlyingIterators]] to « _iterated_ ».
4830648324
1. Return _result_.
4830748325
</emu-alg>
4830848326
</emu-clause>
@@ -48349,8 +48367,8 @@ <h1>Iterator.prototype.map ( _mapper_ )</h1>
4834948367
1. Let _completion_ be Completion(Yield(_mapped_)).
4835048368
1. IfAbruptCloseIterator(_completion_, _iterated_).
4835148369
1. Set _counter_ to _counter_ + 1.
48352-
1. Let _result_ be CreateIteratorFromClosure(_closure_, *"Iterator Helper"*, %IteratorHelperPrototype%, « [[UnderlyingIterator]] »).
48353-
1. Set _result_.[[UnderlyingIterator]] to _iterated_.
48370+
1. Let _result_ be CreateIteratorFromClosure(_closure_, *"Iterator Helper"*, %IteratorHelperPrototype%, « [[UnderlyingIterators]] »).
48371+
1. Set _result_.[[UnderlyingIterators]] to « _iterated_ ».
4835448372
1. Return _result_.
4835548373
</emu-alg>
4835648374
</emu-clause>
@@ -48433,8 +48451,8 @@ <h1>Iterator.prototype.take ( _limit_ )</h1>
4843348451
1. If _value_ is ~done~, return ReturnCompletion(*undefined*).
4843448452
1. Let _completion_ be Completion(Yield(_value_)).
4843548453
1. IfAbruptCloseIterator(_completion_, _iterated_).
48436-
1. Let _result_ be CreateIteratorFromClosure(_closure_, *"Iterator Helper"*, %IteratorHelperPrototype%, « [[UnderlyingIterator]] »).
48437-
1. Set _result_.[[UnderlyingIterator]] to _iterated_.
48454+
1. Let _result_ be CreateIteratorFromClosure(_closure_, *"Iterator Helper"*, %IteratorHelperPrototype%, « [[UnderlyingIterators]] »).
48455+
1. Set _result_.[[UnderlyingIterators]] to « _iterated_ ».
4843848456
1. Return _result_.
4843948457
</emu-alg>
4844048458
</emu-clause>

0 commit comments

Comments
 (0)