-
-
Notifications
You must be signed in to change notification settings - Fork 407
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
Always return undefined
from functions that do not return
#1528
Conversation
The test Test262 conformance changes:
Fixed tests (32):
Broken tests (2):
|
Huh. Maybe we don't change the executor to boa/boa/src/syntax/ast/node/throw/mod.rs Lines 51 to 56 in ae73c26
I don't know if setting the executor to |
Just an additional comment. The correct fix in this case would be to check every statement here and every declaration here and return the corresponding Completion Record, but knowing we haven't implemented Completion Records to propagate state at execution, this is possibly the best we can do right now. Maybe we should start thinking about refactoring the executor to return Completion Records instead of JsValues. |
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.
Nice catch!
Ah sorry, it's the executor's job. |
Nice, Github is bugging lol |
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.
Does setting the interpreter inside the throw
ast to InterpreterState::Return
work for fixing the failing tests? If not, you can ignore this.
I tried that, it does not fix the failing test, but some others fail and some pass. We definitely have to investigate how we implement completion records. I will try to find a good example and open an issue based on that. |
Okay, let me approve then :) |
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.
Completion Records should fix the two failing tests. Good work!
This Pull Request fixes/closes #672.
It changes the following:
undefined
from functions that do notreturn
JSON.parse
test