mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-03 04:52:06 +02:00
Cache raw data pointers on fixed-length typed array views so asm GetByValue and PutByValue can use them directly for indexed element access. Replace the asm typed-array hot-path ArrayBuffer/DataBlock/ByteBuffer walk with one cached_data_ptr load. Remove six unconditional loads, four branches, and the byte_offset add before the element access, trading them for one cached_data_ptr null check. Keep direct C++ typed-array access on IsValidIntegerIndex-based checks, invalidate cached pointers eagerly when a backing ArrayBuffer is detached, and add regression coverage for shrink, regrow, and detach on number and BigInt typed arrays.