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 93cd17db74 LibJS: Add fast path internal_has_property() for Array
If array has packed index property storage without holes, we could check
if indexed property is present simple by checking if it's less than
array's length.

Makes the following program go 1.1x faster:
```js
function f() {
    let array = [];
    for (let i = 0; i < 3_000; i++) {
        array.push(i);
    }

    for (let i = 0; i < 10_000; i++) {
        array.map(x => x * 2);
    }
}

f();
```
2025-06-03 23:18:41 +02:00
..
Bytecode LibJS: Do more comprehensive check if next() fast path is possible 2025-06-02 00:15:36 +02:00
Contrib/Test262 LibJS: Add minimum changes to build on Windows and run js.exe 2025-05-29 03:26:23 -06:00
Heap LibGC+Everywhere: Factor out a LibGC from LibJS 2024-11-15 14:49:20 +01:00
Runtime LibJS: Add fast path internal_has_property() for Array 2025-06-03 23:18:41 +02:00
Tests LibJS: Optimize Function.prototype.apply() 2025-06-03 17:16:01 +02:00
AST.cpp LibJS+LibWeb: Replace StringOrSymbol usage with PropertyKey 2025-05-17 10:08:37 -04:00
AST.h LibJS: Make generate_labelled_evaluation non-virtual if possible 2025-05-12 11:40:45 -06:00
CMakeLists.txt LibJS: Add minimum changes to build on Windows and run js.exe 2025-05-29 03:26:23 -06: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 Meta: Enforce newlines around namespaces 2025-05-14 02:01:59 -06: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
LocalVariable.h LibJS: Preserve information about local variables declaration kind 2025-05-06 12:06:23 +02:00
MarkupGenerator.cpp LibJS+LibWeb: Replace StringOrSymbol usage with PropertyKey 2025-05-17 10:08:37 -04:00
MarkupGenerator.h
Module.cpp LibJS: Mark sync module evaluation promise as handled 2025-05-05 17:50:18 +12:00
Module.h LibJS: Mark sync module evaluation promise as handled 2025-05-05 17:50:18 +12:00
ModuleLoading.h LibGC+Everywhere: Factor out a LibGC from LibJS 2024-11-15 14:49:20 +01:00
Parser.cpp LibJS: Fix arrow function parsing bug 2025-05-26 12:44:21 +03:00
Parser.h Meta: Enforce newlines around namespaces 2025-05-14 02:01:59 -06: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 js: Don't escape printed strings with --disable-string-quotes 2025-06-01 09:51:09 -04:00
Print.h js: Add option to disable quotes around strings 2025-05-29 17:33:26 -06: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
SourceRange.h
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
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
Token.h LibJS: Use FlyString in PropertyKey instead of DeprecatedFlyString 2025-03-24 22:27:17 +00:00