mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-10 17:12:41 +02:00
Skip the generic HasProperty and Get loop when indexOf operates on a simple packed array. In that case every index below length is an own data property, so a direct scan of the packed indexed property storage gives the same strict-equality result without the per-element property lookup ceremony. Only use the fast path when the current packed storage size still matches the length captured before fromIndex coercion, since that coercion can run user code and mutate the receiver. Add coverage for length and storage mutations during fromIndex coercion.