ladybird/Libraries/LibJS
Aliaksandr Kalenik 646457099c LibJS: Avoid IteratorRecord GC-allocation in GetIterator instruction
With this change, `GetIterator` no longer GC-allocates an
`IteratorRecord`. Instead, it stores the iterator record fields in
bytecode registers. This avoids per-iteration allocations in patterns
like: `for (let [x] of array) {}`.

`IteratorRecord` now inherits from `IteratorRecordImpl`, which holds the
iteration state. This allows the existing iteration helpers
(`iterator_next()`, `iterator_step()`, etc.) operate on both the
GC-allocated and the register-backed forms.

Microbenchmarks:
1.1x array-destructuring-assignment-rest.js
1.226x array-destructuring-assignment.js
2025-11-02 20:05:47 +01:00
..
Bytecode LibJS: Avoid IteratorRecord GC-allocation in GetIterator instruction 2025-11-02 20:05:47 +01:00
Contrib/Test262 LibJS+LibWeb+WebContent: Port JS::PropertyKey to UTF-16 2025-08-05 07:07:15 -04:00
Heap LibJS: Make run_executable() return simple ThrowCompletionOr<Value> 2025-10-31 08:56:02 +01:00
Runtime LibJS: Avoid IteratorRecord GC-allocation in GetIterator instruction 2025-11-02 20:05:47 +01:00
Tests Meta: Upgrade prettier to version 3.6.2 2025-10-31 19:55:50 -04:00
AST.cpp LibGC: Delete operators ! and bool from GC::Ref 2025-10-29 21:20:10 +01:00
AST.h LibJS: Move InstantiateOrdinaryFunctionExpression into interpreter 2025-10-27 21:14:33 +01:00
CMakeLists.txt Tests/LibJS: Enable test-js on Windows 2025-08-24 12:58:27 -06:00
Console.cpp LibJS: Remove ExecutionContext::function_name field 2025-10-29 21:20:10 +01:00
Console.h LibJS: Implement console.dirxml 2025-08-17 07:28:56 -04:00
CyclicModule.cpp LibJS: Do not verify cycle root's status is linked in CyclicModule 2025-10-22 11:54:56 +02:00
CyclicModule.h LibJS: Sync additional Import Attributes spec changes 2025-10-22 10:58:19 +02:00
Forward.h LibJS: Make CachedSourceRange GC-allocated 2025-11-01 08:40:32 +01:00
Lexer.cpp LibJS: Correct line ending detection in debug output 2025-09-28 11:23:41 -04:00
Lexer.h LibJS: Port the JS lexer and parser to UTF-16 2025-08-13 09:56:13 -04:00
LocalVariable.h LibJS: Port the Identifier AST (and related) nodes to UTF-16 2025-08-13 09:56:13 -04:00
Module.cpp LibJS: Sync additional Import Attributes spec changes 2025-10-22 10:58:19 +02:00
Module.h Everywhere: Slap some [[clang::lifetimebound]] where appropriate 2025-09-01 11:11:38 +02:00
ModuleLoading.h LibGC+Everywhere: Factor out a LibGC from LibJS 2024-11-15 14:49:20 +01:00
Parser.cpp LibJS: Let bytecode instructions know whether they are in strict mode 2025-10-29 21:20:10 +01:00
Parser.h LibJS: Port the Identifier AST (and related) nodes to UTF-16 2025-08-13 09:56:13 -04: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: Cache source code positions more often 2024-12-02 11:42:11 +01:00
Print.cpp LibJS+LibWeb: Replace JS::Utf16String with AK::Utf16String 2025-07-18 12:45:38 -04:00
Print.h LibJS: Enable EXPLICIT_SYMBOL_EXPORT and annotate minimum symbol set 2025-07-22 11:51:29 -04:00
Script.cpp LibJS: Stop tracking whether execution context is strict mode or not 2025-10-29 21:20:10 +01:00
Script.h LibJS: Stop tracking whether execution context is strict mode or not 2025-10-29 21:20:10 +01:00
SourceCode.cpp LibJS: Port the JS lexer and parser to UTF-16 2025-08-13 09:56:13 -04:00
SourceCode.h LibJS: Port the JS lexer and parser to UTF-16 2025-08-13 09:56:13 -04:00
SourceRange.h LibJS: Enable EXPLICIT_SYMBOL_EXPORT and annotate minimum symbol set 2025-07-22 11:51:29 -04:00
SourceTextModule.cpp LibJS: Make run_executable() return simple ThrowCompletionOr<Value> 2025-10-31 08:56:02 +01:00
SourceTextModule.h LibJS+LibWeb+WebContent: Port JS::PropertyKey to UTF-16 2025-08-05 07:07:15 -04:00
SyntaxHighlighter.cpp LibJS: Port the JS lexer and parser to UTF-16 2025-08-13 09:56:13 -04:00
SyntaxHighlighter.h LibJS: Enable EXPLICIT_SYMBOL_EXPORT and annotate minimum symbol set 2025-07-22 11:51:29 -04:00
SyntheticModule.cpp LibJS+LibWeb+WebContent: Port JS::PropertyKey to UTF-16 2025-08-05 07:07:15 -04:00
SyntheticModule.h LibJS+LibWeb+WebContent: Port JS::PropertyKey to UTF-16 2025-08-05 07:07:15 -04:00
Token.cpp LibJS: Port the JS lexer and parser to UTF-16 2025-08-13 09:56:13 -04:00
Token.h LibWebView: Enable in Windows CI 2025-08-23 16:04:36 -06:00