Skip to content

Commit b1d267c

Browse files
re-use IteratorResult objects when possible (#18)
1 parent e1dad98 commit b1d267c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

spec.emu

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ copyright: false
2525
1. Let _iteratorRecord_ be ? GetIteratorDirect(_iter_).
2626
1. Let _innerAlive_ be *true*.
2727
1. Repeat, while _innerAlive_ is *true*,
28-
1. Let _innerValue_ be ? IteratorStepValue(_iteratorRecord_).
29-
1. If _innerValue_ is ~done~, then
28+
1. Let _iteratorResult_ be ? IteratorStep(_iteratorRecord_).
29+
1. If _iteratorResult_ is ~done~, then
3030
1. Set _innerAlive_ to *false*.
3131
1. Else,
32-
1. Let _completion_ be Completion(Yield(_innerValue_)).
32+
1. Let _completion_ be Completion(GeneratorYield(_iteratorResult_)).
3333
1. If _completion_ is an abrupt completion, then
3434
1. Return ? IteratorClose(_iteratorRecord_, _completion_).
3535
1. Return ReturnCompletion(*undefined*).

0 commit comments

Comments
 (0)