From 6de1a0aeaf28b8d2dc808321d62c225272ac58e6 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Mon, 28 Apr 2025 20:40:20 +0200 Subject: [PATCH] LibJS: Don't cache a pointer to accumulator register in run_bytecode() The old accumulator register is really only used to pass the end completion to the caller of run_bytecode() nowadays. As such, we don't need to cache a pointer to it for fast access. One less thing to do on run_bytecode() entry. --- Libraries/LibJS/Bytecode/Interpreter.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Libraries/LibJS/Bytecode/Interpreter.cpp b/Libraries/LibJS/Bytecode/Interpreter.cpp index 372d086db47..d7e6a4f39b0 100644 --- a/Libraries/LibJS/Bytecode/Interpreter.cpp +++ b/Libraries/LibJS/Bytecode/Interpreter.cpp @@ -377,7 +377,6 @@ FLATTEN_ON_CLANG void Interpreter::run_bytecode(size_t entry_point) } auto& running_execution_context = this->running_execution_context(); - auto& accumulator = this->accumulator(); auto& executable = current_executable(); auto const* bytecode = executable.bytecode.data(); @@ -417,7 +416,7 @@ FLATTEN_ON_CLANG void Interpreter::run_bytecode(size_t entry_point) handle_End: { auto& instruction = *reinterpret_cast(&bytecode[program_counter]); - accumulator = get(instruction.value()); + accumulator() = get(instruction.value()); return; }