ladybird/Libraries/LibWeb/WebIDL
Aliaksandr Kalenik d45f8a3081
Some checks are pending
CI / macOS, arm64, Sanitizer, Clang (push) Waiting to run
CI / Linux, x86_64, Fuzzers, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer, GNU (push) Waiting to run
CI / Linux, x86_64, Sanitizer, Clang (push) Waiting to run
Package the js repl as a binary artifact / Linux, arm64 (push) Waiting to run
Package the js repl as a binary artifact / macOS, arm64 (push) Waiting to run
Package the js repl as a binary artifact / Linux, x86_64 (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
LibJS: Add inline caching for adding new own properties to objects
We already had IC support in PutById for the following cases:
- Changing an existing own property
- Calling a setter located in the prototype chain

This was enough to speed up code where structurally identical objects
(same shape) are processed in a loop:
```js
const arr = [{ a: 1 }, { a: 2 }, { a: 3 }];
for (let obj of arr) {
    obj.a += 1;
}
```

However, creating structurally identical objects in a loop was still
slow:
```js
for (let i = 0; i < 10_000_000; i++) {
    const o = {};
    o.a = 1;
    o.b = 2;
    o.c = 3;
}
```

This change addresses that by adding a new IC type that caches both the
source and target shapes, allowing property additions to be fast-pathed
by directly jumping to the shape that already includes the new property.
2025-09-17 12:44:44 +02:00
..
AbstractOperations.cpp LibWeb: Enable EXPLICIT_SYMBOL_EXPORT 2025-08-23 16:04:36 -06:00
AbstractOperations.h LibWeb: Enable EXPLICIT_SYMBOL_EXPORT 2025-08-23 16:04:36 -06:00
AsyncIterator.cpp LibIDL+LibWeb: Begin support for async iterator in IDL 2025-04-14 17:43:11 -04:00
AsyncIterator.h LibJS+LibWeb: Inline fast path for Value::to_object() 2025-09-15 12:16:58 +02:00
Buffers.cpp LibWeb/IDB: Update convert_a_value_to_a_key to latest changes 2025-03-13 11:23:15 +01:00
Buffers.h LibWeb/IDB: Update convert_a_value_to_a_key to latest changes 2025-03-13 11:23:15 +01:00
CachedAttribute.h LibWeb: Add support for caching IDL attribute values 2025-08-26 06:28:10 -04:00
CallbackType.cpp
CallbackType.h
DOMException.cpp LibJS+LibWeb: Port interned bytecode strings to UTF-16 2025-08-14 10:27:08 +02:00
DOMException.h LibWeb: Enable EXPLICIT_SYMBOL_EXPORT 2025-08-23 16:04:36 -06:00
DOMException.idl LibJS+LibWeb: Port interned bytecode strings to UTF-16 2025-08-14 10:27:08 +02:00
ExceptionOr.h Everywhere: Change west consts caught by clang-format-21 to east consts 2025-08-29 18:18:55 +01:00
Function.idl
ObservableArray.cpp LibJS: Add inline caching for adding new own properties to objects 2025-09-17 12:44:44 +02:00
ObservableArray.h LibJS: Add inline caching for adding new own properties to objects 2025-09-17 12:44:44 +02:00
OverloadResolution.cpp LibJS+LibWeb+WebContent: Port JS::PropertyKey to UTF-16 2025-08-05 07:07:15 -04:00
OverloadResolution.h LibWeb: Enable EXPLICIT_SYMBOL_EXPORT 2025-08-23 16:04:36 -06:00
Promise.cpp LibWeb: Implement ReadableStreamPipeTo according to spec 2025-04-11 12:10:46 -04:00
Promise.h LibWeb: Enable EXPLICIT_SYMBOL_EXPORT 2025-08-23 16:04:36 -06:00
Tracing.cpp WebContent: Enable in Windows CI 2025-08-23 16:04:36 -06:00
Tracing.h LibWeb: Enable EXPLICIT_SYMBOL_EXPORT 2025-08-23 16:04:36 -06:00
Types.h