1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-22 19:05:07 +00:00

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

This commit is contained in:
Andreas Kling 2023-09-26 16:05:22 +02:00
parent 031ec98803
commit 951a85992b

View file

@ -188,7 +188,7 @@ Interpreter::ValueAndFrame Interpreter::run_and_return_frame(Executable& executa
while (!pc.at_end()) { while (!pc.at_end()) {
auto& instruction = *pc; auto& instruction = *pc;
auto ran_or_error = instruction.execute(*this); 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(); reg(Register::exception()) = *ran_or_error.throw_completion().value();
if (unwind_contexts().is_empty()) if (unwind_contexts().is_empty())
break; break;