1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-11 10:18:15 +09:00
ladybird/Userland/Libraries/LibWeb/WebDriver
Aliaksandr Kalenik 4d5823a5bc LibWeb+LibJS: Skip function environment allocation if possible
If a function has the following properties:
- uses only local variables and registers
- does not use `this`
- does not use `new.target`
- does not use `super`
- does not use direct eval() calls

then it is possible to entirely skip function environment allocation
because it will never be used

This change adds gathering of information whether a function needs to
access `this` from environment and updates `prepare_for_ordinary_call()`
to skip allocation when possible.

For now, this optimisation is too aggressively blocked; e.g. if `this`
is used in a function scope, then all functions in outer scopes have to
allocate an environment. It could be improved in the future, although
this implementation already allows skipping >80% of environment
allocations on Discord, GitHub and Twitter.
2024-05-04 06:48:07 +02:00
..
Capabilities.cpp LibWeb: Stub out WebDriver deserialize as a proxy capability AO 2024-02-12 11:43:22 -07:00
Capabilities.h
Client.cpp LibWeb: Hide WebDriver::match_route debug behind its own flag 2024-02-08 15:53:46 +01:00
Client.h LibWeb: Stub out Release Actions 2023-08-21 13:22:04 -06:00
Contexts.cpp LibWeb+WebContent: Convert WebDriver to choose a navigable AO 2024-02-05 08:05:48 -07:00
Contexts.h
ElementLocationStrategies.cpp
ElementLocationStrategies.h
Error.cpp Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
Error.h Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
ExecuteScript.cpp LibWeb+LibJS: Skip function environment allocation if possible 2024-05-04 06:48:07 +02:00
ExecuteScript.h Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
Response.cpp Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
Response.h
Screenshot.cpp LibWeb: Ignore window-forwarded document.body.onfoo in detached DOM 2024-03-11 18:29:10 +01:00
Screenshot.h
TimeoutsConfiguration.cpp AK+Everywhere: Remove JsonValue APIs with implicit default values 2024-01-21 15:47:53 -07:00
TimeoutsConfiguration.h