Files
ladybird/Libraries/LibJS
Aliaksandr Kalenik bfbc3352b5 LibJS: Extend Array.prototype.shift() fast path to holey arrays
indexed_take_first() already memmoves elements down for both Packed and
Holey storage, but the caller at ArrayPrototype::shift() only entered
the fast path for Packed arrays. Holey arrays fell through to the
spec-literal per-element loop (has_property / get / set /
delete_property_or_throw), which is substantially slower.

Add a separate Holey predicate with the additional safety checks the
spec semantics require: default_prototype_chain_intact() (so
HasProperty on a hole doesn't escape to a poisoned prototype) and
extensible() (so set() on a hole slot doesn't create a new own
property on a non-extensible object). The existing Packed predicate
is left unchanged -- packed arrays don't need these checks because
every index in [0, size) is already an own data property.

Allows us to fail at Cloudflare Turnstile way much faster!
2026-04-23 21:47:21 +02:00
..
2026-04-03 21:21:09 +02:00
2026-04-03 21:21:09 +02:00
2026-04-03 21:21:09 +02:00
2026-04-03 21:21:09 +02:00
2026-03-19 21:55:10 -05:00
2026-04-03 21:21:09 +02:00
2026-03-19 21:55:10 -05:00
2026-04-03 21:21:09 +02:00