diff --git a/Userland/Libraries/LibJS/Bytecode/Interpreter.cpp b/Userland/Libraries/LibJS/Bytecode/Interpreter.cpp index a07f3946d5..1de8d6d935 100644 --- a/Userland/Libraries/LibJS/Bytecode/Interpreter.cpp +++ b/Userland/Libraries/LibJS/Bytecode/Interpreter.cpp @@ -1000,7 +1000,6 @@ static ThrowCompletionOr dispatch_builtin_call(Bytecode::Interpreter& int ThrowCompletionOr Call::execute_impl(Bytecode::Interpreter& interpreter) const { - auto& vm = interpreter.vm(); auto callee = interpreter.reg(m_callee); TRY(throw_if_needed_for_call(interpreter, callee, call_type(), expression_string())); @@ -1010,12 +1009,7 @@ ThrowCompletionOr Call::execute_impl(Bytecode::Interpreter& interpreter) c return {}; } - MarkedVector argument_values(vm.heap()); - argument_values.ensure_capacity(m_argument_count); - for (u32 i = 0; i < m_argument_count; ++i) { - argument_values.unchecked_append(interpreter.reg(Register { m_first_argument.index() + i })); - } - interpreter.accumulator() = TRY(perform_call(interpreter, interpreter.reg(m_this_value), call_type(), callee, move(argument_values))); + interpreter.accumulator() = TRY(perform_call(interpreter, interpreter.reg(m_this_value), call_type(), callee, interpreter.registers().slice(m_first_argument.index(), m_argument_count))); return {}; }