mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-03 04:52:06 +02:00
CachedSourceRange was a GC-allocated cell stored on the ExecutionContext, only needed because ExecutionContext must be trivially destructible. Move the source range cache to a HashMap<u32, SourceRange> on the Executable (keyed by program counter), where it belongs. This eliminates the GC::Cell subclass entirely and removes the cached_source_range field from ExecutionContext. StackTraceElement and TracebackFrame now store Optional<SourceRange> directly instead of GC::Ptr<CachedSourceRange>. Shrinks ExecutionContext from 144 to 136 bytes.
8.7 KiB
8.7 KiB