-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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: Fixed return types of algorithms returning ~empty~ #2924
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.
LGTM.
1e42b3a
to
6b058c2
Compare
I've rebased this on #2966. |
6b058c2
to
61e10a8
Compare
I agree this is broken but I think there's a better way to fix it. I'll try to write it up. |
f917449
to
8cff0e0
Compare
I've pushed a commit which handles the changes to In essence this means that the "implicit return" case (i.e., walking past the end of a function body) is now handled in The fact that |
0d6023d
to
5f19284
Compare
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.
lgtm. This is great.
) Co-authored-by: jhnaldo <[email protected]> Co-authored-by: Michael Ficarra <[email protected]> Co-authored-by: Kevin Gibbons <[email protected]>
5f19284
to
a44ea31
Compare
) Co-authored-by: jhnaldo <[email protected]> Co-authored-by: Michael Ficarra <[email protected]> Co-authored-by: Kevin Gibbons <[email protected]>
a44ea31
to
d36a8cd
Compare
) Co-authored-by: jhnaldo <[email protected]> Co-authored-by: Michael Ficarra <[email protected]> Co-authored-by: Kevin Gibbons <[email protected]>
d36a8cd
to
35af909
Compare
We found the return type bug in the syntax-directed operation: 15.7.12 Runtime Semantics: EvaluateClassStaticBlockBody via ESMeta type analyzer.
Currently, the type of
CatchClauseEvaluation
is defined as follows:However, I think its return type should contain
a normal completion containing ~empty~
.In step 2 for, it returns the result of
Evaluation of |ClassStaticBlockStatementList|
. Because of the implicit definition of operations for chain productions (ClassStaticBlockStatementList
->StatementList
->StatementListItem
->Statement
->BlockStatement
->Block
), theEvaluation of |Block|
might be invoked, and it returns a normal completion containing~empty~
. Thus,CatchClauseEvaluation
algorithm could returna normal completion containing ~empty~
.Therefore, I suggest extending its return type as follows:
In addition, we found similar bugs in the following algorithms: