-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Editorial: Unify style of abrupt completion and non-LoopContinues result handling in ForIn/OfBodyEvaluation #3595
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
Editorial: Unify style of abrupt completion and non-LoopContinues result handling in ForIn/OfBodyEvaluation #3595
Conversation
|
@michaelficarra This doesn't have any effect on behaviour of source text evaluation. It's strictly only a reordering of a few lines. |
linusg
left a comment
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.
I like it :)
michaelficarra
left a comment
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.
Ah I see, this is relying on the fact that there's no call site for iterationKind of ~enumerate~ and iteratorKind of ~async~. This could probably be stated explicitly somewhere.
I can add asserts in the |
|
@aapoalas I had something else in mind #3475 (comment) |
9816e74 to
9d2b0a9
Compare
…ult handling in ForIn/OfBodyEvaluation (tc39#3595)
9d2b0a9 to
be305fc
Compare
…ult handling in ForIn/OfBodyEvaluation tc39/ecma262#3595
…ult handling in ForIn/OfBodyEvaluation tc39/ecma262#3595
…ult handling in ForIn/OfBodyEvaluation (tc39#3595)
…ult handling in ForIn/OfBodyEvaluation (tc39#3595)
A personal favourite of mine: the order of checking/comparing
iterationKindanditeratorKindis different between two otherwise nearly identical blocks handling abrupt completions (exceptions) in the loop header binding, and handling non-loop-continuing results of the body evaluation.The difference makes the two blocks really hard to compare, even though they're 100% the same except for the
UpdateEmptycall.