Skip to content

Commit ff60140

Browse files
sygljharb
authored andcommitted
Editorial: IterableToList -> IteratorToList (#3021)
Also remove the the optional method parameter and change the callsites to explicitly get the iterator.
1 parent 2562811 commit ff60140

File tree

1 file changed

+6
-11
lines changed

1 file changed

+6
-11
lines changed

spec.html

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7008,20 +7008,15 @@ <h1>
70087008
</emu-note>
70097009
</emu-clause>
70107010

7011-
<emu-clause id="sec-iterabletolist" type="abstract operation">
7011+
<emu-clause id="sec-iteratortolist" oldids="sec-iterabletolist" type="abstract operation">
70127012
<h1>
7013-
IterableToList (
7014-
_items_: an ECMAScript language value,
7015-
optional _method_: a function object,
7013+
IteratorToList (
7014+
_iteratorRecord_: an Iterator Record,
70167015
): either a normal completion containing a List of ECMAScript language values or a throw completion
70177016
</h1>
70187017
<dl class="header">
70197018
</dl>
70207019
<emu-alg>
7021-
1. If _method_ is present, then
7022-
1. Let _iteratorRecord_ be ? GetIteratorFromMethod(_items_, _method_).
7023-
1. Else,
7024-
1. Let _iteratorRecord_ be ? GetIterator(_items_, ~sync~).
70257020
1. Let _values_ be a new empty List.
70267021
1. Let _next_ be *true*.
70277022
1. Repeat, while _next_ is not *false*,
@@ -30789,7 +30784,7 @@ <h1>AggregateError ( _errors_, _message_ [ , _options_ ] )</h1>
3078930784
1. Let _msg_ be ? ToString(_message_).
3079030785
1. Perform CreateNonEnumerableDataPropertyOrThrow(_O_, *"message"*, _msg_).
3079130786
1. Perform ? InstallErrorCause(_O_, _options_).
30792-
1. Let _errorsList_ be ? IterableToList(_errors_).
30787+
1. Let _errorsList_ be ? IteratorToList(? GetIterator(_errors_, ~sync~)).
3079330788
1. Perform ! DefinePropertyOrThrow(_O_, *"errors"*, PropertyDescriptor { [[Configurable]]: *true*, [[Enumerable]]: *false*, [[Writable]]: *true*, [[Value]]: CreateArrayFromList(_errorsList_) }).
3079430789
1. Return _O_.
3079530790
</emu-alg>
@@ -39022,7 +39017,7 @@ <h1>%TypedArray%.from ( _source_ [ , _mapfn_ [ , _thisArg_ ] ] )</h1>
3902239017
1. Let _mapping_ be *true*.
3902339018
1. Let _usingIterator_ be ? GetMethod(_source_, @@iterator).
3902439019
1. If _usingIterator_ is not *undefined*, then
39025-
1. Let _values_ be ? IterableToList(_source_, _usingIterator_).
39020+
1. Let _values_ be ? IteratorToList(? GetIteratorFromMethod(_source_, _usingIterator_)).
3902639021
1. Let _len_ be the number of elements in _values_.
3902739022
1. Let _targetObj_ be ? TypedArrayCreate(_C_, « 𝔽(_len_) »).
3902839023
1. Let _k_ be 0.
@@ -40113,7 +40108,7 @@ <h1>_TypedArray_ ( ..._args_ )</h1>
4011340108
1. Assert: _firstArgument_ is an Object and _firstArgument_ does not have either a [[TypedArrayName]] or an [[ArrayBufferData]] internal slot.
4011440109
1. Let _usingIterator_ be ? GetMethod(_firstArgument_, @@iterator).
4011540110
1. If _usingIterator_ is not *undefined*, then
40116-
1. Let _values_ be ? IterableToList(_firstArgument_, _usingIterator_).
40111+
1. Let _values_ be ? IteratorToList(? GetIteratorFromMethod(_firstArgument_, _usingIterator_)).
4011740112
1. Perform ? InitializeTypedArrayFromList(_O_, _values_).
4011840113
1. Else,
4011940114
1. NOTE: _firstArgument_ is not an Iterable so assume it is already an array-like object.

0 commit comments

Comments
 (0)