1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-30 10:32:17 +00:00

LibJS: Add bytecode generation for FunctionExpression :^)

This commit is contained in:
Andreas Kling 2021-06-11 10:46:46 +02:00
parent 749a3b9245
commit af48a066c6
3 changed files with 8 additions and 1 deletions

View file

@ -218,7 +218,7 @@ void Call::execute(Bytecode::Interpreter& interpreter) const
void NewFunction::execute(Bytecode::Interpreter& interpreter) const
{
auto& vm = interpreter.vm();
interpreter.accumulator() = ScriptFunction::create(interpreter.global_object(), m_function_node.name(), m_function_node.body(), m_function_node.parameters(), m_function_node.function_length(), vm.current_scope(), m_function_node.is_generator(), m_function_node.is_strict_mode());
interpreter.accumulator() = ScriptFunction::create(interpreter.global_object(), m_function_node.name(), m_function_node.body(), m_function_node.parameters(), m_function_node.function_length(), vm.current_scope(), m_function_node.is_generator(), m_function_node.is_strict_mode(), m_function_node.is_arrow_function());
}
void Return::execute(Bytecode::Interpreter& interpreter) const