Repository navigation
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. |
Ah sorry, it's the executor's job. |
|
Nice, Github is bugging lol |
jedel1043
left a comment
There was a problem hiding this comment.
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 :) |
jedel1043
left a comment
There was a problem hiding this comment.
Completion Records should fix the two failing tests. Good work!
This Pull Request fixes/closes #672.
It changes the following:
undefinedfrom functions that do notreturnJSON.parsetest