ladybird/Libraries/LibWeb/Bindings
Andreas Kling 183c847c80
Some checks are pending
CI / Lagom (x86_64, Fuzzers_CI, false, ubuntu-24.04, Linux, Clang) (push) Waiting to run
CI / Lagom (arm64, Sanitizer_CI, false, macos-15, macOS, Clang) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, false, ubuntu-24.04, Linux, GNU) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, true, ubuntu-24.04, Linux, Clang) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (arm64, macos-15, macOS, macOS-universal2) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (x86_64, ubuntu-24.04, Linux, Linux-x86_64) (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run
LibJS: Cache PutById to setters in the prototype chain
This is *extremely* common on the web, but barely shows up at all in
JavaScript benchmarks.

A typical example is setting Element.innerHTML on a HTMLDivElement.
HTMLDivElement doesn't have innerHTML, so it has to travel up the
prototype chain until it finds it.

Before this change, we didn't cache this at all, so we had to travel
the prototype chain every time a setter like this was used.

We now use the same mechanism we already had for GetBydId and cache
PutById setter accesses in the prototype chain as well.

1.74x speedup on MicroBench/setter-in-prototype-chain.js
2025-05-05 15:21:43 +02:00
..
AudioConstructor.cpp AK+Everywhere: Rename verify_cast to as 2025-01-21 11:34:06 -05:00
AudioConstructor.h LibGC+Everywhere: Factor out a LibGC from LibJS 2024-11-15 14:49:20 +01:00
ExceptionOrUtils.h LibWeb: Remove dom_ from dom_exception_to_throw_completion 2024-12-09 20:02:51 -07:00
HostDefined.cpp Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
HostDefined.h LibGC+Everywhere: Factor out a LibGC from LibJS 2024-11-15 14:49:20 +01:00
ImageConstructor.cpp LibJS: Inline the fast path of Value::to_i32() and simplify to_u32() 2025-04-09 22:06:49 +02:00
ImageConstructor.h LibGC+Everywhere: Factor out a LibGC from LibJS 2024-11-15 14:49:20 +01:00
Intrinsics.cpp LibJS+LibWeb: Add fast_is<T> helpers for Realm::HostDefined class family 2025-04-18 14:45:56 +02:00
Intrinsics.h LibWeb: Only set prototype once for object with IDL interface 2025-04-20 18:43:11 +02:00
MainThreadVM.cpp LibWeb/HTML: Hook up a WorkerAgent for web workers 2025-04-25 14:07:51 +02:00
MainThreadVM.h LibWeb/HTML: Hook up a WorkerAgent for web workers 2025-04-25 14:07:51 +02:00
OptionConstructor.cpp AK+Everywhere: Rename verify_cast to as 2025-01-21 11:34:06 -05:00
OptionConstructor.h LibGC+Everywhere: Factor out a LibGC from LibJS 2024-11-15 14:49:20 +01:00
PlatformObject.cpp LibJS: Cache PutById to setters in the prototype chain 2025-05-05 15:21:43 +02:00
PlatformObject.h LibJS: Cache PutById to setters in the prototype chain 2025-05-05 15:21:43 +02:00
PrincipalHostDefined.cpp Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
PrincipalHostDefined.h LibJS+LibWeb: Add fast_is<T> helpers for Realm::HostDefined class family 2025-04-18 14:45:56 +02:00
Serializable.h LibWeb: Reorganize definitions and includes to avoid circular references 2024-11-24 11:11:44 +01:00
SyntheticHostDefined.cpp LibWeb: Visit proper base class in SyntheticHostDefined 2024-11-30 11:55:11 +01:00
SyntheticHostDefined.h LibJS+LibWeb: Add fast_is<T> helpers for Realm::HostDefined class family 2025-04-18 14:45:56 +02:00
Transferable.h Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00