1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 15:27:35 +00:00

LibJS: Move is_arrow_function() from FunctionExpression to FunctionNode

This will make it easier to write bytecode generation for function
expressions in just a moment.
This commit is contained in:
Andreas Kling 2021-06-11 10:45:49 +02:00
parent 17da54d49c
commit 749a3b9245
2 changed files with 7 additions and 6 deletions

View file

@ -100,7 +100,7 @@ Value FunctionDeclaration::execute(Interpreter& interpreter, GlobalObject&) cons
Value FunctionExpression::execute(Interpreter& interpreter, GlobalObject& global_object) const
{
InterpreterNodeScope node_scope { interpreter, *this };
return ScriptFunction::create(global_object, name(), body(), parameters(), function_length(), interpreter.current_scope(), is_generator(), is_strict_mode() || interpreter.vm().in_strict_mode(), m_is_arrow_function);
return ScriptFunction::create(global_object, name(), body(), parameters(), function_length(), interpreter.current_scope(), is_generator(), is_strict_mode() || interpreter.vm().in_strict_mode(), is_arrow_function());
}
Value ExpressionStatement::execute(Interpreter& interpreter, GlobalObject& global_object) const