mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-16 15:21:56 +00:00
LibJS: Mark exception-handling paths with [[unlikely]] in interpreter
This appears actually helpful and consistently makes all benchmarks slightly faster on my machine.
This commit is contained in:
parent
aec7dd5778
commit
c8865458da
Notes:
github-actions[bot]
2025-04-06 02:48:07 +00:00
Author: https://github.com/awesomekling
Commit: c8865458da
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4248
1 changed files with 2 additions and 2 deletions
|
@ -481,7 +481,7 @@ FLATTEN_ON_CLANG void Interpreter::run_bytecode(size_t entry_point)
|
|||
goto start; \
|
||||
} \
|
||||
auto result = op_snake_case(vm(), get(instruction.lhs()), get(instruction.rhs())); \
|
||||
if (result.is_error()) { \
|
||||
if (result.is_error()) [[unlikely]] { \
|
||||
if (handle_exception(program_counter, result.error_value()) == HandleExceptionResponse::ExitFromExecutable) \
|
||||
return; \
|
||||
goto start; \
|
||||
|
@ -563,7 +563,7 @@ FLATTEN_ON_CLANG void Interpreter::run_bytecode(size_t entry_point)
|
|||
auto& instruction = *reinterpret_cast<Op::name const*>(&bytecode[program_counter]); \
|
||||
{ \
|
||||
auto result = instruction.execute_impl(*this); \
|
||||
if (result.is_error()) { \
|
||||
if (result.is_error()) [[unlikely]] { \
|
||||
if (handle_exception(program_counter, result.error_value()) == HandleExceptionResponse::ExitFromExecutable) \
|
||||
return; \
|
||||
goto start; \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue