Commit Graph

6 Commits

Author SHA1 Message Date
Aliaksandr Kalenik
65b09cc4e3 LibJS: Store AlreadyResolved bit on the resolve function itself
Previously, each pair of promise resolving functions allocated a
dedicated AlreadyResolved GC cell to hold a single shared bool. Move the
bit onto the resolve function as a plain member, and have the reject
function reach it through a GC::Ptr back to its paired resolve function.
2026-05-02 20:24:47 +02:00
Aliaksandr Kalenik
4182952090 LibJS: Replace PromiseResolvingFunction closure with a Kind enum
Every Promise allocates two PromiseResolvingFunction cells (resolve and
reject). Each cell stored an AK::Function holding a closure, but neither
closure captured anything beyond the Promise and AlreadyResolved already
present as cell fields.

Hoist the two closure bodies into static functions on Promise and
dispatch by a Kind enum on the cell. This removes the AK::Function
storage embedded in each cell along with its off-GC malloc'd closure
capture.
2026-04-30 20:22:54 +02:00
ayeteadoe
539a675802 LibJS: Revert Enable EXPLICIT_SYMBOL_EXPORT
This reverts commit c14173f651. We
should only annotate the minimum number of symbols that external
consumers actually use, so I am starting from scratch to do that
2025-07-22 11:51:29 -04:00
ayeteadoe
c14173f651 LibJS: Enable EXPLICIT_SYMBOL_EXPORT 2025-06-30 10:50:36 -06:00
Shannon Booth
f87041bf3a LibGC+Everywhere: Factor out a LibGC from LibJS
Resulting in a massive rename across almost everywhere! Alongside the
namespace change, we now have the following names:

 * JS::NonnullGCPtr -> GC::Ref
 * JS::GCPtr -> GC::Ptr
 * JS::HeapFunction -> GC::Function
 * JS::CellImpl -> GC::Cell
 * JS::Handle -> GC::Root
2024-11-15 14:49:20 +01:00
Timothy Flynn
93712b24bf Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00