ladybird/Libraries/LibJS
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
..
AsmIntGen AsmIntGen: Avoid clobbering r11 in store_operand 2026-04-10 15:12:53 +02:00
Bytecode LibJS: Cache stable for-in iteration at bytecode sites 2026-04-10 15:12:53 +02:00
BytecodeDef LibJS: Cache stable for-in iteration at bytecode sites 2026-04-10 15:12:53 +02:00
Contrib/Test262 LibJS: Make more use of Value::is and Value::as_if 2026-02-28 10:24:37 -05:00
Heap LibJS: Eliminate GeneratorResult GC cell allocation on yield/await 2026-03-20 15:57:23 -05:00
Runtime LibJS: Cache stable for-in iteration at bytecode sites 2026-04-10 15:12:53 +02:00
Rust LibJS: Cache stable for-in iteration at bytecode sites 2026-04-10 15:12:53 +02:00
CMakeLists.txt LibJS: Cache stable for-in iteration at bytecode sites 2026-04-10 15:12:53 +02:00
Console.cpp LibJS+LibWeb: Make DOMException hold an [[ErrorData]] slot 2026-04-08 20:33:53 +02:00
Console.h LibJS+LibWeb: Make DOMException hold an [[ErrorData]] slot 2026-04-08 20:33:53 +02:00
CyclicModule.cpp LibWeb: Support WASM modules 2026-04-03 21:21:09 +02:00
CyclicModule.h LibWeb: Support WASM modules 2026-04-03 21:21:09 +02:00
Forward.h LibJS+LibWeb: Make DOMException hold an [[ErrorData]] slot 2026-04-08 20:33:53 +02:00
LocalVariable.h LibJS: Port the Identifier AST (and related) nodes to UTF-16 2025-08-13 09:56:13 -04:00
Module.cpp LibWeb: Support WASM modules 2026-04-03 21:21:09 +02:00
Module.h LibWeb: Support WASM modules 2026-04-03 21:21:09 +02:00
ModuleEntry.h LibJS: Remove C++ AST 2026-03-19 21:55:10 -05:00
ModuleLoading.h LibGC+Everywhere: Factor out a LibGC from LibJS 2024-11-15 14:49:20 +01:00
ParserError.cpp LibJS: Port the JS lexer and parser to UTF-16 2025-08-13 09:56:13 -04:00
ParserError.h LibJS: Port the JS lexer and parser to UTF-16 2025-08-13 09:56:13 -04:00
Position.h LibJS: Store full realized SourceRange with each AST node 2025-12-29 13:36:01 +01:00
Print.cpp Everywhere: Remove ShadowRealm support 2026-04-05 13:57:58 +02:00
Print.h LibJS: Enable EXPLICIT_SYMBOL_EXPORT and annotate minimum symbol set 2025-07-22 11:51:29 -04:00
RustIntegration.cpp LibJS: Cache stable for-in iteration at bytecode sites 2026-04-10 15:12:53 +02:00
RustIntegration.h Everywhere: Remove ShadowRealm support 2026-04-05 13:57:58 +02:00
Script.cpp LibJS: Remove C++ compiler pipeline fallback paths 2026-03-19 21:55:10 -05:00
Script.h LibWeb: Support CSS modules 2026-04-03 21:21:09 +02:00
SourceCode.cpp LibJS: Cache ASCII-to-UTF-16 source conversion for Rust compilation 2026-02-25 00:00:52 +01:00
SourceCode.h LibJS: Cache ASCII-to-UTF-16 source conversion for Rust compilation 2026-02-25 00:00:52 +01:00
SourceRange.h LibJS: Remove C++ AST 2026-03-19 21:55:10 -05:00
SourceTextModule.cpp LibJS+LibWeb: Pass constants into execution context constructor 2026-03-29 13:44:06 +02:00
SourceTextModule.h LibJS: Remove C++ AST 2026-03-19 21:55:10 -05:00
SyntaxHighlighter.cpp Meta: Remove ENABLE_RUST build configuration option 2026-04-02 22:59:42 +02:00
SyntaxHighlighter.h LibJS: Enable EXPLICIT_SYMBOL_EXPORT and annotate minimum symbol set 2025-07-22 11:51:29 -04:00
SyntheticModule.cpp LibWeb: Support WASM modules 2026-04-03 21:21:09 +02:00
SyntheticModule.h LibWeb: Support WASM modules 2026-04-03 21:21:09 +02:00
Token.h LibJS: Remove C++ lexer, use Rust tokenizer for syntax highlighting 2026-03-19 21:55:10 -05:00