@@ -7000,14 +7000,16 @@ <h1>
7000
7000
<h1>
7001
7001
GetIteratorFlattenable (
7002
7002
_obj_: an ECMAScript language value,
7003
- _stringHandling_ : ~iterate-strings ~ or ~reject-strings ~,
7003
+ _primitiveHandling_ : ~iterate-string-primitives ~ or ~reject-primitives ~,
7004
7004
): either a normal completion containing an Iterator Record or a throw completion
7005
7005
</h1>
7006
7006
<dl class="header">
7007
7007
</dl>
7008
7008
<emu-alg>
7009
7009
1. If _obj_ is not an Object, then
7010
- 1. If _stringHandling_ is ~reject-strings~ or _obj_ is not a String, throw a *TypeError* exception.
7010
+ 1. If _primitiveHandling_ is ~reject-primitives~, throw a *TypeError* exception.
7011
+ 1. Assert: _primitiveHandling_ is ~iterate-string-primitives~.
7012
+ 1. If _obj_ is not a String, throw a *TypeError* exception.
7011
7013
1. Let _method_ be ? GetMethod(_obj_, %Symbol.iterator%).
7012
7014
1. If _method_ is *undefined*, then
7013
7015
1. Let _iterator_ be _obj_.
@@ -46574,7 +46576,7 @@ <h1>Iterator.prototype</h1>
46574
46576
<emu-clause id="sec-iterator.from">
46575
46577
<h1>Iterator.from ( _O_ )</h1>
46576
46578
<emu-alg>
46577
- 1. Let _iteratorRecord_ be ? GetIteratorFlattenable(_O_, ~iterate-strings ~).
46579
+ 1. Let _iteratorRecord_ be ? GetIteratorFlattenable(_O_, ~iterate-string-primitives ~).
46578
46580
1. Let _hasInstance_ be ? OrdinaryHasInstance(%Iterator%, _iteratorRecord_.[[Iterator]]).
46579
46581
1. If _hasInstance_ is *true*, then
46580
46582
1. Return _iteratorRecord_.[[Iterator]].
@@ -46813,7 +46815,7 @@ <h1>Iterator.prototype.flatMap ( _mapper_ )</h1>
46813
46815
1. If _value_ is ~done~, return *undefined*.
46814
46816
1. Let _mapped_ be Completion(Call(_mapper_, *undefined*, « _value_, 𝔽(_counter_) »)).
46815
46817
1. IfAbruptCloseIterator(_mapped_, _iterated_).
46816
- 1. Let _innerIterator_ be Completion(GetIteratorFlattenable(_mapped_, ~reject-strings ~)).
46818
+ 1. Let _innerIterator_ be Completion(GetIteratorFlattenable(_mapped_, ~reject-primitives ~)).
46817
46819
1. IfAbruptCloseIterator(_innerIterator_, _iterated_).
46818
46820
1. Let _innerAlive_ be *true*.
46819
46821
1. Repeat, while _innerAlive_ is *true*,
0 commit comments