ladybird/Tests/LibJS/Runtime/loops
Andreas Kling 879ac36e45 LibJS: Cache stable for-in iteration at bytecode sites
Cache the flattened enumerable key snapshot for each `for..in` site and
reuse a `PropertyNameIterator` when the receiver shape, dictionary
generation, indexed storage kind and length, prototype chain
validity, and magical-length state still match.

Handle packed indexed receivers as well as plain named-property
objects. Teach `ObjectPropertyIteratorNext` in `asmint.asm` to return
cached property values directly and to fall back to the slow iterator
logic when any guard fails.

Treat arrays' hidden non-enumerable `length` property as a visited
name for for-in shadowing, and include the receiver's magical-length
state in the cache key so arrays and plain objects do not share
snapshots.

Add `test-js` and `test-js-bytecode` coverage for mixed numeric and
named keys, packed receiver transitions, re-entry, iterator reuse, GC
retention, array length shadowing, and same-site cache reuse.
2026-04-10 15:12:53 +02:00
..
break-basic.js LibJS: Move tests to /Tests/LibJS 2026-01-22 07:46:48 -05:00
continue-basic.js LibJS: Move tests to /Tests/LibJS 2026-01-22 07:46:48 -05:00
do-while-basic.js LibJS: Move tests to /Tests/LibJS 2026-01-22 07:46:48 -05:00
for-await-of.js LibJS: Move tests to /Tests/LibJS 2026-01-22 07:46:48 -05:00
for-basic.js LibJS: Move tests to /Tests/LibJS 2026-01-22 07:46:48 -05:00
for-head-errors.js LibJS: Move tests to /Tests/LibJS 2026-01-22 07:46:48 -05:00
for-in-basic.js LibJS: Cache stable for-in iteration at bytecode sites 2026-04-10 15:12:53 +02:00
for-no-curlies.js LibJS: Move tests to /Tests/LibJS 2026-01-22 07:46:48 -05:00
for-of-basic.js LibJS: Fix AssignmentTargetType for NewExpression and strict mode 2026-03-13 13:08:22 -05:00
for-of-iterator-close.js LibJS: Inline AsyncIteratorClose with proper Await in for-await-of 2026-02-12 11:37:43 +01:00
for-scopes.js LibJS: Move tests to /Tests/LibJS 2026-01-22 07:46:48 -05:00
while-basic.js LibJS: Move tests to /Tests/LibJS 2026-01-22 07:46:48 -05:00