Skip to content

Conversation

michaelficarra
Copy link
Member

CreateIteratorFromClosure passes the AC to GeneratorStart which treats any normal completion return value the same as a ReturnCompletion(*undefined*). It seems better to me to use NormalCompletion(~unused~) in these locations and only return a return completion if we want to use a value other than *undefined*.

@michaelficarra michaelficarra requested a review from a team May 15, 2025 00:25
@michaelficarra michaelficarra added editorial change completion records Relates to completion records, and ? / ! notation. labels May 15, 2025
@bakkot
Copy link
Member

bakkot commented May 15, 2025

I don't like that we have this degree of freedom. We should pick one and stick with it, and ensure the machinery only supports that kind. I'll prepare some PRs so we can see what the machinery would look like in each case.

@bakkot
Copy link
Member

bakkot commented May 15, 2025

PRs: #3605 / #3606.

I didn't do the actual changes to the ACs; that can wait until we decide which way we want to go. My preference is #3606.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

completion records Relates to completion records, and ? / ! notation. editorial change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants