ladybird/Libraries/LibWeb/Bindings
Andreas Kling 4d92c4d71a LibJS: Skip initializing constant slots in ExecutionContext
Every function call allocates an ExecutionContext with a trailing array
of Values for registers, locals, constants, and arguments. Previously,
the constructor would initialize all slots to js_special_empty_value(),
but constant slots were then immediately overwritten by the interpreter
copying in values from the Executable before execution began.

To eliminate this redundant initialization, we rearrange the layout from
[registers | constants | locals] to [registers | locals | constants].
This groups registers and locals together at the front, allowing us to
initialize only those slots while leaving constant slots uninitialized
until they're populated with their actual values.

This reduces the per-call initialization cost from O(registers + locals
+ constants) to O(registers + locals).

Also tightens up the types involved (size_t -> u32) and adds VERIFYs to
guard against overflow when computing the combined slot counts, and to
ensure the total fits within the 29-bit operand index field.
2026-01-19 10:48:12 +01:00
..
AgentType.h LibWeb: Move AgentType enum to its own header 2025-05-18 17:50:05 -06:00
AudioConstructor.cpp LibWeb: Avoid invoking Trusted Types where avoidable 2025-11-06 11:43: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 LibWeb: Avoid invoking Trusted Types where avoidable 2025-11-06 11:43:06 -05:00
ImageConstructor.h LibGC+Everywhere: Factor out a LibGC from LibJS 2024-11-15 14:49:20 +01:00
Intrinsics.cpp LibWeb/Bindings: Ensure identity for [LegacyUnforgeable] attributes 2026-01-08 12:57:17 +01:00
Intrinsics.h LibWeb/Bindings: Ensure identity for [LegacyUnforgeable] attributes 2026-01-08 12:57:17 +01:00
MainThreadVM.cpp LibJS: Skip initializing constant slots in ExecutionContext 2026-01-19 10:48:12 +01:00
MainThreadVM.h LibWeb: Don't associate mutation observer microtask with a document 2025-12-27 16:40:34 +01:00
OptionConstructor.cpp LibWeb: Avoid invoking Trusted Types where avoidable 2025-11-06 11:43:06 -05:00
OptionConstructor.h LibGC+Everywhere: Factor out a LibGC from LibJS 2024-11-15 14:49:20 +01:00
PlatformObject.cpp LibJS: Add number-to-string cache for numbers < 1000 2025-10-05 21:44:06 +02:00
PlatformObject.h LibWeb/HTML: Implement the Origin interface 2025-12-30 12:40:27 +01: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+WebWorker: Use IPC mechanics for structured serialization 2025-07-18 10:09:02 -04: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 LibWeb+WebWorker: Use IPC mechanics for structured serialization 2025-07-18 10:09:02 -04:00