Files
ladybird/Libraries/LibJS/Runtime/Value.h
Andreas Kling d138474e0d LibJS: Avoid unnecessary shifts in Value empty/null/undefined checks
We know that the payload is always 0 for these three Value types, and so
we can implement checking for them as full 64-bit compares against
constant values instead of checking just the tag.

This avoids shifting the tag 48 bits to the right before comparing it.
Since these are used all over the place, it actually leads to a nice
code size reduction.
2025-04-06 04:47:01 +02:00

22 KiB