-
Notifications
You must be signed in to change notification settings - Fork 474
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
Conversation
There was a problem hiding this 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"); |
There was a problem hiding this comment.
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.)
test/language/statements/async-generator/yield-star-promise-not-unwrapped.js
Outdated
Show resolved
Hide resolved
a0679bb
to
b7f9d1b
Compare
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 thatyield*
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.