Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement changes for "avoid mostly-redundant await in async yield*" #3619

Merged
merged 4 commits into from Sep 6, 2022

Conversation

bakkot
Copy link
Contributor

@bakkot bakkot commented Jul 28, 2022

These are updates for tc39/ecma262#2819.

I made the relevant modification to engine262 in a local branch, ran all of test262, and only found one test whose behavior needed to change, which was exercising the number of ticks implied by yield* in an async generator. This PR modifies that test and also adds an explicit test for that yield* does not perform unwrapping of the inner value.

I recommend reviewing commits individually - in particular, the first commit only updates the existing test's info to match the current spec, which is then modified to match tc39/ecma262#2819 in the second commit. It's hard to see the change otherwise.

cc @anba who wrote the test which is being updated.

Copy link
Contributor

@jugglinmike jugglinmike left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! I just want to make sure the license is accurate before merging.

throw new Test262Error(".return should not be accessed");
},
get throw() {
throw new Test262Error(".throw should not be accessed");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In cases like this, I prefer to observe execution with "flag" variables that are then asserted at the end of the test. Reason being: the exception handling mechanisms are themselves being validated, so there's a risk that whatever bug causes this statement to be evaluated would also cause the failure not to be reported.

That said, async tests are fundamentally dependent on asynchronous exception handling semantics, so I don't feel this risk is large enough to warrant another round of review. (I'm sharing my perspective anyway in case it's relevant for future tests and in case anyone out there can explain why I should reconsider.)

@Ms2ger Ms2ger merged commit 7461973 into main Sep 6, 2022
@Ms2ger Ms2ger deleted the remove-yield-star-await branch September 6, 2022 11:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants