mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 18:17:44 +00:00
LibJS: Don't VERIFY that a function is Regular when executing in AST
By replacing this VERIFY with a thrown Error we no longer crash when calling a generator function in the AST interpreter. This allows us to more gracefully handle situation which have not been implemented yet. In particular this helps the libjs-test262-runner since it can now continue on to the next tests instead of having the entire process end.
This commit is contained in:
parent
ff1b72c95c
commit
9c9aaf4d4f
3 changed files with 5 additions and 3 deletions
|
@ -3371,11 +3371,11 @@ void ScopeNode::add_hoisted_function(NonnullRefPtr<FunctionDeclaration> declarat
|
|||
m_functions_hoistable_with_annexB_extension.append(move(declaration));
|
||||
}
|
||||
|
||||
Value ImportStatement::execute(Interpreter& interpreter, GlobalObject&) const
|
||||
Value ImportStatement::execute(Interpreter& interpreter, GlobalObject& global_object) const
|
||||
{
|
||||
InterpreterNodeScope node_scope { interpreter, *this };
|
||||
dbgln("Modules are not fully supported yet!");
|
||||
TODO();
|
||||
interpreter.vm().throw_exception<InternalError>(global_object, ErrorType::NotImplemented, "'import' in modules");
|
||||
return {};
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue