1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 10:28:10 +00:00

LibJS: Use an enum class instead of 'bool is_generator'

This avoid confusion in the order of the multiple boolean parameters
that exist.
This commit is contained in:
Ali Mohammad Pur 2021-06-11 03:38:05 +04:30 committed by Ali Mohammad Pur
parent 5ffe23e4f3
commit 8b3f8879c1
9 changed files with 46 additions and 29 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(), m_function_node.is_arrow_function());
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.kind(), m_function_node.is_strict_mode(), m_function_node.is_arrow_function());
}
void Return::execute(Bytecode::Interpreter& interpreter) const