mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-27 02:05:07 +02:00
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.
24 KiB
24 KiB