LibJS: Store the bytecode accumulator in a dedicated physical register

We now use a dedicated physical register to store the bytecode
accumulator, instead of loading and storing it to the memory everytime.
This commit is contained in:
Idan Horowitz 2023-10-29 15:29:42 +02:00 committed by Andreas Kling
parent f9cab320e6
commit 38f3b78a1d
Notes: sideshowbarker 2024-07-17 18:23:22 +09:00
5 changed files with 163 additions and 129 deletions

View file

@ -934,7 +934,7 @@ ThrowCompletionOr<void> CallWithArgumentArray::execute_impl(Bytecode::Interprete
{
auto callee = interpreter.reg(m_callee);
TRY(throw_if_needed_for_call(interpreter, callee, call_type(), expression_string()));
auto argument_values = argument_list_evaluation(interpreter);
auto argument_values = argument_list_evaluation(interpreter.vm(), interpreter.accumulator());
interpreter.accumulator() = TRY(perform_call(interpreter, interpreter.reg(m_this_value), call_type(), callee, move(argument_values)));
return {};
}
@ -1217,7 +1217,7 @@ ThrowCompletionOr<void> IteratorResultValue::execute_impl(Bytecode::Interpreter&
ThrowCompletionOr<void> NewClass::execute_impl(Bytecode::Interpreter& interpreter) const
{
interpreter.accumulator() = TRY(new_class(interpreter.vm(), m_class_expression, m_lhs_name));
interpreter.accumulator() = TRY(new_class(interpreter.vm(), interpreter.accumulator(), m_class_expression, m_lhs_name));
return {};
}