From 3dcf7e3159770fe9faf5a780765875bc9f06b6b2 Mon Sep 17 00:00:00 2001 From: Michael Ficarra Date: Mon, 2 Dec 2024 14:45:15 -0700 Subject: [PATCH 1/2] fully match yield* by doing one last IteratorValue (15.5.5 step 7.a.v.1) --- spec.emu | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spec.emu b/spec.emu index 05f42b2..cf5c4da 100644 --- a/spec.emu +++ b/spec.emu @@ -27,6 +27,8 @@ copyright: false 1. Repeat, while _innerAlive_ is *true*, 1. Let _iteratorResult_ be ? IteratorStep(_iteratorRecord_). 1. If _iteratorResult_ is ~done~, then + 1. Let _completion_ be Completion(IteratorValue(_iteratorResult_)). + 1. If _completion_ is an abrupt completion, return Completion(_completion_). 1. Set _innerAlive_ to *false*. 1. Else, 1. Let _completion_ be Completion(GeneratorYield(_iteratorResult_)). From 1ae8e8426b8cf638f2776e75a45d84823bfd0601 Mon Sep 17 00:00:00 2001 From: Michael Ficarra Date: Mon, 2 Dec 2024 18:42:20 -0700 Subject: [PATCH 2/2] simplify --- spec.emu | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/spec.emu b/spec.emu index cf5c4da..a717619 100644 --- a/spec.emu +++ b/spec.emu @@ -27,8 +27,7 @@ copyright: false 1. Repeat, while _innerAlive_ is *true*, 1. Let _iteratorResult_ be ? IteratorStep(_iteratorRecord_). 1. If _iteratorResult_ is ~done~, then - 1. Let _completion_ be Completion(IteratorValue(_iteratorResult_)). - 1. If _completion_ is an abrupt completion, return Completion(_completion_). + 1. Perform ? IteratorValue(_iteratorResult_). 1. Set _innerAlive_ to *false*. 1. Else, 1. Let _completion_ be Completion(GeneratorYield(_iteratorResult_)).