Revert "LibJS: Avoid calling generic Instruction::length() during dispatch"

This reverts commit 8f2ee01e6f.

Speculative revert, as this appears to severely regress performance on
our JS benchmark runner.
This commit is contained in:
Andreas Kling 2025-04-03 15:09:49 +02:00
parent ec590ef3e6
commit cba80580e2
Notes: github-actions[bot] 2025-04-03 13:11:53 +00:00
2 changed files with 1 additions and 9 deletions

View file

@ -386,7 +386,7 @@ FLATTEN_ON_CLANG void Interpreter::run_bytecode(size_t entry_point)
#define DISPATCH_NEXT(name) \
do { \
if constexpr (Op::name::IsVariableLength) \
program_counter += static_cast<Op::name const&>(instruction).length(); \
program_counter += instruction.length(); \
else \
program_counter += sizeof(Op::name); \
auto& next_instruction = *reinterpret_cast<Instruction const*>(&bytecode[program_counter]); \