Browse Source

LibJS: Mark the exception path as [[unlikely]] in the interpreter loop

Andreas Kling 1 year ago
parent
commit
951a85992b
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Userland/Libraries/LibJS/Bytecode/Interpreter.cpp

+ 1 - 1
Userland/Libraries/LibJS/Bytecode/Interpreter.cpp

@@ -188,7 +188,7 @@ Interpreter::ValueAndFrame Interpreter::run_and_return_frame(Executable& executa
         while (!pc.at_end()) {
             auto& instruction = *pc;
             auto ran_or_error = instruction.execute(*this);
-            if (ran_or_error.is_error()) {
+            if (ran_or_error.is_error()) [[unlikely]] {
                 reg(Register::exception()) = *ran_or_error.throw_completion().value();
                 if (unwind_contexts().is_empty())
                     break;