From aa992671f9caae153d521476a3235f58eb3a29d3 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sun, 6 Apr 2025 01:29:00 +0200 Subject: [PATCH] LibJS: Mark Interpreter::handle_exception() as NEVER_INLINE Before this change, we were inlining this function after every handler for instructions that could throw. Forcing it out-of-line shrinks the main bytecode interpreter by 15% and yields a decent 2.5% speedup on JetStream/gcc-loops.cpp.js --- Libraries/LibJS/Bytecode/Interpreter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Libraries/LibJS/Bytecode/Interpreter.cpp b/Libraries/LibJS/Bytecode/Interpreter.cpp index c64f9faba4d..496bc30faa3 100644 --- a/Libraries/LibJS/Bytecode/Interpreter.cpp +++ b/Libraries/LibJS/Bytecode/Interpreter.cpp @@ -323,7 +323,7 @@ ThrowCompletionOr Interpreter::run(SourceTextModule& module) return js_undefined(); } -Interpreter::HandleExceptionResponse Interpreter::handle_exception(size_t& program_counter, Value exception) +NEVER_INLINE Interpreter::HandleExceptionResponse Interpreter::handle_exception(size_t& program_counter, Value exception) { reg(Register::exception()) = exception; m_scheduled_jump = {};