浏览代码

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

Andreas Kling 1 年之前
父节点
当前提交
951a85992b
共有 1 个文件被更改,包括 1 次插入1 次删除
  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;