ladybird/Libraries/LibJS
Andreas Kling b23aa38546 AK: Adopt mimalloc v2 as main allocator
Use mimalloc for Ladybird-owned allocations without overriding malloc().
Route kmalloc(), kcalloc(), krealloc(), and kfree() through mimalloc,
and put the embedded Rust crates on the same allocator via a shared
shim in AK/kmalloc.cpp.

This also lets us drop kfree_sized(), since it no longer used its size
argument. StringData, Utf16StringData, JS object storage, Rust error
strings, and the CoreAudio playback helpers can all free their AK-backed
storage with plain kfree().

Sanitizer builds still use the system allocator. LeakSanitizer does not
reliably trace references stored in mimalloc-managed AK containers, so
static caches and other long-lived roots can look leaked. Pass the old
size into the Rust realloc shim so aligned fallback reallocations can
move posix_memalign-backed blocks safely.

Static builds still need a little linker help. macOS app binaries need
the Rust allocator entry points forced in from liblagom-ak.a, while
static ELF links can pull in identical allocator shim definitions from
multiple Rust staticlibs. Keep the Apple -u flags and allow those
duplicate shim symbols for LibJS and LibRegex links on Linux and BSD.
2026-04-08 09:57:53 +02:00
..
AsmIntGen LibJS: Re-box double arithmetic results as Int32 when possible 2026-03-19 09:42:04 +01:00
Bytecode LibJS: Rename Value::as_array() to Value::as_array_exotic_object()` 2026-03-29 13:45:38 +02:00
BytecodeDef LibJS: Use the 2024 Rust edition for AsmIntGen and ByteCodeDef 2026-03-11 16:57:09 -04:00
Contrib/Test262 LibJS: Make more use of Value::is and Value::as_if 2026-02-28 10:24:37 -05:00
Heap LibJS: Eliminate GeneratorResult GC cell allocation on yield/await 2026-03-20 15:57:23 -05:00
Runtime AK: Adopt mimalloc v2 as main allocator 2026-04-08 09:57:53 +02:00
Rust AK: Adopt mimalloc v2 as main allocator 2026-04-08 09:57:53 +02:00
CMakeLists.txt AK: Adopt mimalloc v2 as main allocator 2026-04-08 09:57:53 +02:00
Console.cpp LibJS: Handle proxy-wrapped arrays in console.table() 2026-03-29 13:45:38 +02:00
Console.h LibJS: Add source locations to console.trace() 2026-02-06 11:58:07 +00:00
CyclicModule.cpp LibWeb: Support WASM modules 2026-04-03 21:21:09 +02:00
CyclicModule.h LibWeb: Support WASM modules 2026-04-03 21:21:09 +02:00
Forward.h Everywhere: Remove ShadowRealm support 2026-04-05 13:57:58 +02:00
LocalVariable.h LibJS: Port the Identifier AST (and related) nodes to UTF-16 2025-08-13 09:56:13 -04:00
Module.cpp LibWeb: Support WASM modules 2026-04-03 21:21:09 +02:00
Module.h LibWeb: Support WASM modules 2026-04-03 21:21:09 +02:00
ModuleEntry.h LibJS: Remove C++ AST 2026-03-19 21:55:10 -05:00
ModuleLoading.h LibGC+Everywhere: Factor out a LibGC from LibJS 2024-11-15 14:49:20 +01:00
ParserError.cpp LibJS: Port the JS lexer and parser to UTF-16 2025-08-13 09:56:13 -04:00
ParserError.h LibJS: Port the JS lexer and parser to UTF-16 2025-08-13 09:56:13 -04:00
Position.h LibJS: Store full realized SourceRange with each AST node 2025-12-29 13:36:01 +01:00
Print.cpp Everywhere: Remove ShadowRealm support 2026-04-05 13:57:58 +02:00
Print.h LibJS: Enable EXPLICIT_SYMBOL_EXPORT and annotate minimum symbol set 2025-07-22 11:51:29 -04:00
RustIntegration.cpp AK: Adopt mimalloc v2 as main allocator 2026-04-08 09:57:53 +02:00
RustIntegration.h Everywhere: Remove ShadowRealm support 2026-04-05 13:57:58 +02:00
Script.cpp LibJS: Remove C++ compiler pipeline fallback paths 2026-03-19 21:55:10 -05:00
Script.h LibWeb: Support CSS modules 2026-04-03 21:21:09 +02:00
SourceCode.cpp LibJS: Cache ASCII-to-UTF-16 source conversion for Rust compilation 2026-02-25 00:00:52 +01:00
SourceCode.h LibJS: Cache ASCII-to-UTF-16 source conversion for Rust compilation 2026-02-25 00:00:52 +01:00
SourceRange.h LibJS: Remove C++ AST 2026-03-19 21:55:10 -05:00
SourceTextModule.cpp LibJS+LibWeb: Pass constants into execution context constructor 2026-03-29 13:44:06 +02:00
SourceTextModule.h LibJS: Remove C++ AST 2026-03-19 21:55:10 -05:00
SyntaxHighlighter.cpp Meta: Remove ENABLE_RUST build configuration option 2026-04-02 22:59:42 +02:00
SyntaxHighlighter.h LibJS: Enable EXPLICIT_SYMBOL_EXPORT and annotate minimum symbol set 2025-07-22 11:51:29 -04:00
SyntheticModule.cpp LibWeb: Support WASM modules 2026-04-03 21:21:09 +02:00
SyntheticModule.h LibWeb: Support WASM modules 2026-04-03 21:21:09 +02:00
Token.h LibJS: Remove C++ lexer, use Rust tokenizer for syntax highlighting 2026-03-19 21:55:10 -05:00