1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-08 05:27:14 +09:00
ladybird/Libraries/LibJS
Aliaksandr Kalenik 60bd5012fe LibJS: Optimize array destructuring assignment for builtin iterators
...by avoiding `{ value, done }` iterator result value allocation. This
change applies the same otimization 81b6a11 added for `for..in` and
`for..of`.

Makes following micro benchmark go 22% faster on my computer:
```js
function f() {
    const arr = [];
    for (let i = 0; i < 10_000_000; i++) {
        arr.push([i]);
    }
    let sum = 0;
    for (let [i] of arr) {
        sum += i;
    }
}

f();
```
2025-05-01 16:57:56 +03:00
..
Bytecode LibJS: Optimize array destructuring assignment for builtin iterators 2025-05-01 16:57:56 +03:00
Contrib/Test262 LibJS: Use Value::to_byte_string() in fewer places 2025-03-28 12:31:40 -04:00
Heap LibGC+Everywhere: Factor out a LibGC from LibJS 2024-11-15 14:49:20 +01:00
Runtime LibJS: Allow advancing built-in iterators without result object creation 2025-04-30 20:51:39 +02:00
Tests LibJS: Ensure iterator parameter validation closes underlying iterator 2025-04-29 07:33:08 -04:00
AST.cpp LibJS: Remove [[VarNames]] from GlobalEnvironment 2025-04-29 07:33:08 -04:00
AST.h LibJS: Skip allocating locals for arguments that allowed to be local 2025-04-26 11:02:29 +02:00
CMakeLists.txt LibJS: Implement rawJSON and isRawJSON functions 2025-04-24 09:33:49 -04:00
Console.cpp LibJS: Use FlyString in PropertyKey instead of DeprecatedFlyString 2025-03-24 22:27:17 +00:00
Console.h LibGC: Rename MarkedVector => RootVector 2024-12-26 19:10:44 +01:00
CyclicModule.cpp LibJS: Update spec steps / links for the import-assertions proposal 2025-04-29 07:33:08 -04:00
CyclicModule.h LibJS: Update spec steps / links for the import-assertions proposal 2025-04-29 07:33:08 -04:00
Forward.h LibJS: Allow advancing built-in iterators without result object creation 2025-04-30 20:51:39 +02:00
Lexer.cpp LibJS: Use FlyString in PropertyKey instead of DeprecatedFlyString 2025-03-24 22:27:17 +00:00
Lexer.h LibJS: Use FlyString in PropertyKey instead of DeprecatedFlyString 2025-03-24 22:27:17 +00:00
MarkupGenerator.cpp LibJS: Make Value() default-construct the undefined value 2025-04-05 11:20:26 +02:00
MarkupGenerator.h Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
Module.cpp LibJS: Update spec steps / links for the import-assertions proposal 2025-04-29 07:33:08 -04:00
Module.h LibJS: Update spec steps / links for the import-assertions proposal 2025-04-29 07:33:08 -04:00
ModuleLoading.h LibGC+Everywhere: Factor out a LibGC from LibJS 2024-11-15 14:49:20 +01:00
Parser.cpp LibJS: Update spec steps / links for the import-assertions proposal 2025-04-29 07:33:08 -04:00
Parser.h LibJS: Allow using local variable for catch parameters 2025-04-22 21:57:25 +02:00
ParserError.cpp LibJS: Use FlyString in PropertyKey instead of DeprecatedFlyString 2025-03-24 22:27:17 +00:00
ParserError.h LibJS: Use FlyString in PropertyKey instead of DeprecatedFlyString 2025-03-24 22:27:17 +00:00
Position.h LibJS: Cache source code positions more often 2024-12-02 11:42:11 +01:00
Print.cpp LibCore+LibJS+LibWasm: Always use a real format string 2025-04-08 20:00:18 -04:00
Print.h Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
Script.cpp LibGC+Everywhere: Factor out a LibGC from LibJS 2024-11-15 14:49:20 +01:00
Script.h LibJS+LibWeb: Add fast_is<T> helpers for HTML::Script class family 2025-04-18 14:45:56 +02:00
SourceCode.cpp LibJS: Cache source code positions more often 2024-12-02 11:42:11 +01:00
SourceCode.h Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
SourceRange.h Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
SourceTextModule.cpp LibJS: Update spec steps / links for the import-assertions proposal 2025-04-29 07:33:08 -04:00
SourceTextModule.h LibJS: Update spec steps / links for the import-assertions proposal 2025-04-29 07:33:08 -04:00
SyntaxHighlighter.cpp LibJS+LibWebView: Treat trivia tokens as comments 2025-03-04 15:54:03 -05:00
SyntaxHighlighter.h Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
SyntheticModule.cpp LibJS: Update spec steps / links for the JSON modules proposal 2025-04-29 07:33:08 -04:00
SyntheticModule.h LibJS: Update spec steps / links for the JSON modules proposal 2025-04-29 07:33:08 -04:00
Token.cpp Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
Token.h LibJS: Use FlyString in PropertyKey instead of DeprecatedFlyString 2025-03-24 22:27:17 +00:00