mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-27 18:17:22 +02:00
x21 (instruction pointer = pb + pc) is already the primary dispatch register. Maintaining w25 (the 32-bit pc offset) in parallel on every dispatch_next, goto_handler, and dispatch_variable was redundant. Compute the 32-bit pc on demand via `sub w1, w21, w26` only when calling into C++ (slow paths), which is the cold path. This removes one instruction from every hot dispatch sequence and every jump target. The generated output shrinks from 4692 to 4345 lines (~347 instructions removed), with every handler benefiting from shorter dispatch tails.