1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-11 18:20:43 +09:00
ladybird/Userland/Libraries
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
..
LibAccelGfx
LibArchive Userland: Avoid some conversions from rvalue strings to StringView 2024-04-04 11:23:21 +02:00
LibAudio Everywhere: Use east const in more places 2024-04-19 06:31:19 -04:00
LibC Meta+Userland: Make LibELF a proper library on Serenity 2024-04-26 19:08:13 -06:00
LibCards Everywhere: Use east const in more places 2024-04-19 06:31:19 -04:00
LibChess Everywhere: Use east const in more places 2024-04-19 06:31:19 -04:00
LibCMake
LibCodeComprehension Everywhere: Use east const in more places 2024-04-19 06:31:19 -04:00
LibCompress Everywhere: Use east const in more places 2024-04-19 06:31:19 -04:00
LibConfig
LibCore LibCore: Make MachPort build on GNU Mach 2024-05-02 07:46:53 -06:00
LibCoredump Meta+Userland: Make LibELF a proper library on Serenity 2024-04-26 19:08:13 -06:00
LibCpp
LibCrypt
LibCrypto LibCrypto: Skip the check against 2^32 on 32-bit 2024-05-02 07:46:53 -06:00
LibDebug Meta+Userland: Make LibELF a proper library on Serenity 2024-04-26 19:08:13 -06:00
LibDesktop LibDesktop+LaunchServer: Propagate AppFile arguments over IPC 2024-04-30 17:43:14 -06:00
LibDeviceTree Kernel/riscv: Use new DeviceTree helpers in PCI initializations 2024-05-02 07:44:13 -06:00
LibDiff Everywhere: Use east const in more places 2024-04-19 06:31:19 -04:00
LibDNS
LibDSP AK+Userland: Remove some needlessly explicit conversions to StringView 2024-04-04 11:23:21 +02:00
LibEDID
LibELF Userland: Compile a special version of LibELF for DynamicLoader 2024-04-26 19:08:13 -06:00
LibFileSystem LibFileSystem: Ignore ENOTSUP when using chown and chmod during copy 2024-04-21 15:34:33 +02:00
LibFileSystemAccessClient
LibGemini AK+LibURL: Move AK::URL into a new URL library 2024-03-18 14:06:28 -04:00
LibGfx LibGfx: Explicitly cast literals to size_t in JBIG2Loader 2024-05-02 07:46:53 -06:00
LibGL LibGL+LibGPU+LibSoftGPU: Implement constant blending color 2024-04-10 21:12:25 +02:00
LibGLSL LibGLSL: Avoid UAF when creating a preprocessor instance 2024-04-04 11:23:21 +02:00
LibGPU Everywhere: Remove 'clang-format off' comments that are no longer needed 2024-04-24 16:50:01 -04:00
LibGUI LibGUI+Everywhere: Rename the 'style' frame property to 'frame_style' 2024-04-30 17:46:41 -06:00
LibHTTP LibTLS+LibHTTP: Tolerate improperly closed TLS sockets 2024-04-17 07:19:03 +02:00
LibIDL LibIDL: Remove unused required_imported_paths field from Interface 2024-04-26 08:00:32 -04:00
LibImageDecoderClient Userland: Remove remaining callers of synchronous ImageDecoder API 2024-04-23 12:32:04 -06:00
LibIMAP Everywhere: Use east const in more places 2024-04-19 06:31:19 -04:00
LibIPC LibIPC: Allow creating MultiServer from an already existing LocalServer 2024-04-27 20:32:12 -04:00
LibJIT
LibJS LibWeb+LibJS: Skip function environment allocation if possible 2024-05-04 06:48:07 +02:00
LibKeyboard
LibLine Everywhere: Use east const in more places 2024-04-19 06:31:19 -04:00
LibLocale LibLocale: Statically link LibLocaleData into LibLocale 2024-04-21 13:34:04 -06:00
LibMain Meta: Remove serenity_lib_static() CMake helper function 2024-03-26 12:25:21 -04:00
LibManual Userland: Avoid some conversions from rvalue strings to StringView 2024-04-04 11:23:21 +02:00
LibMarkdown AK+Userland: Remove some needlessly explicit conversions to StringView 2024-04-04 11:23:21 +02:00
LibPartition Everywhere: Use east const in more places 2024-04-19 06:31:19 -04:00
LibPCIDB Everywhere: Use east const in more places 2024-04-19 06:31:19 -04:00
LibPDF LibPDF: Convert byte offsets to u64 2024-05-02 07:46:53 -06:00
LibProtocol AK+LibURL: Move AK::URL into a new URL library 2024-03-18 14:06:28 -04:00
LibRegex Everywhere: Use east const in more places 2024-04-19 06:31:19 -04:00
LibRIFF LibRIFF+LibGfx/ISOBMFF: Make ChunkID (de)serialization self-consistent 2024-03-22 18:31:15 +01:00
LibSanitizer AK+Kernel+LibSanitizer: Implement __ubsan_handle_function_type_mismatch 2024-04-18 13:14:33 -06:00
LibSemVer
LibSoftGPU LibGL+LibGPU+LibSoftGPU: Implement constant blending color 2024-04-10 21:12:25 +02:00
LibSQL LibCore+LibSQL+LibWebView: Move launching a singleton process to LibCore 2024-04-22 14:46:10 -06:00
LibSymbolication Meta+Userland: Make LibELF a proper library on Serenity 2024-04-26 19:08:13 -06:00
LibSyntax
LibSystem
LibTest Everywhere: Remove uneeded short option argument where possible 2024-04-22 08:10:08 +02:00
LibTextCodec LibTextCodec: Add Windows-1250 text decoder 2024-04-23 16:26:16 +02:00
LibThreading LibThreading: Add a way to cancel and join the background thread 2024-04-26 09:41:24 +02:00
LibTimeZone LibCore+LibTimeZone: Move TZDB utilities from LibTimeZone to LibCore 2024-03-26 12:25:21 -04:00
LibTLS LibTLS: Ignore empty reads from underlying socket while connecting 2024-04-26 15:53:00 +02:00
LibUnicode LibUnicode: Avoid redundant UTF-8 validation in AK::String helpers 2024-04-21 19:32:49 +02:00
LibURL LibURL: Avoid expensive IDNA::to_ascii() for all-ASCII domain strings 2024-04-05 16:01:10 -06:00
LibUSBDB Everywhere: Use east const in more places 2024-04-19 06:31:19 -04:00
LibVideo LibVideo: Allow PlaybackManager owners to terminate the decoder thread 2024-04-26 09:49:11 +02:00
LibVirtGPU
LibVT Everywhere: Use east const in more places 2024-04-19 06:31:19 -04:00
LibWasm Everywhere: Remove 'clang-format off' comments that are no longer needed 2024-04-24 16:50:01 -04:00
LibWeb LibWeb+LibJS: Skip function environment allocation if possible 2024-05-04 06:48:07 +02:00
LibWebSocket Everywhere: Run clang-format 2024-04-24 16:50:01 -04:00
LibWebView Ladybird+LibWebView: Introduce a cache for cookies backed by SQL storage 2024-05-01 07:06:26 +02:00
LibX86
LibXML LibXML: Don't emit a parser error for failing to resolve DTD URI 2024-03-30 07:36:50 +01:00
CMakeLists.txt AK+LibURL: Move AK::URL into a new URL library 2024-03-18 14:06:28 -04:00