ladybird/Libraries/LibJS
Aliaksandr Kalenik bd6750aaa5 LibJS: Skip prototype chain lookup in internal_set() for arrays
...when Array.prototype and Object.prototype are intact.

If `internal_set()` is called on an array exotic object with a numeric
PropertyKey, and:
- the prototype chain has not been modified (i.e., there are no getters
  or setters for indexed properties), and
- the array is not the target of a Proxy object,

then we can directly store the value in the receiver's indexed
properties, without checking whether it already exists somewhere in the
prototype chain.

1.7x improvement on the following program:
```js
function f() {
    let a = [];
    let i = 0;
    while (i < 10_000_000) {
        a.push(i);
        i++;
    }
}

f();
```
2025-05-23 14:51:32 +02:00
..
Bytecode LibJS: Always emit value in emit_named_evaluation_if_anonymous_function 2025-05-23 03:25:55 +02: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: Skip prototype chain lookup in internal_set() for arrays 2025-05-23 14:51:32 +02:00
Tests LibJS: Skip prototype chain lookup in internal_set() for arrays 2025-05-23 14:51:32 +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: 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 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 Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
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: Preserve information about local variables declaration kind 2025-05-06 12:06:23 +02: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 Meta: Enforce newlines around namespaces 2025-05-14 02:01:59 -06:00
Print.h Meta: Enforce newlines around namespaces 2025-05-14 02:01:59 -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 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