Commit graph

6 commits

Author SHA1 Message Date
Andreas Kling
fe48e27a05 LibJS: Replace GC::Weak with GC::RawPtr in inline cache entries
Property lookup cache entries previously used GC::Weak<T> for shape,
prototype, and prototype_chain_validity pointers. Each GC::Weak
requires a ref-counted WeakImpl allocation and an extra indirection
on every access.

Replace these with GC::RawPtr<T> and make Executable a WeakContainer
so the GC can clear stale pointers during sweep via remove_dead_cells.

For static PropertyLookupCache instances (used throughout the runtime
for well-known property lookups), introduce StaticPropertyLookupCache
which registers itself in a global list that also gets swept.

Now that inline cache entries use GC::RawPtr instead of GC::Weak,
we can compare shape/prototype pointers directly without going
through the WeakImpl indirection. This removes one dependent load
from each IC check in GetById, PutById, GetLength, GetGlobal, and
SetGlobal handlers.
2026-03-08 10:27:13 +01:00
Timothy Flynn
100ed4c6a4 LibJS: Implement Iterator.zipKeyed
This is from the Joint Iteration proposal:
https://tc39.es/proposal-joint-iteration/
2026-02-26 13:54:35 -05:00
Timothy Flynn
aa7eb95f98 LibJS: Implement Iterator.zip
This is from the Joint Iteration proposal:
https://tc39.es/proposal-joint-iteration/
2026-02-26 13:54:35 -05:00
Timothy Flynn
c7b3a4fcf8 LibJS: Implement Iterator.concat
This proposal reached stage 4 and was merged into ECMA-262. See:
aefd096
2025-12-03 12:08:40 +01: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
Renamed from Userland/Libraries/LibJS/Runtime/IteratorConstructor.cpp (Browse further)