Commit graph

5 commits

Author SHA1 Message Date
Timothy Flynn
49f1ef52ad LibJS: Remove OOM handling from JS intrinsics initialization 2025-02-05 08:05:01 -05:00
Timothy Flynn
0fe9bbad2e LibJS: Add missing include to Intrinsics.h
This was preventing clangd in my environment from processing the
Intrinsics class.
2025-02-05 08:05:01 -05:00
Andreas Kling
d465e2aa2b LibJS: Cache the Intl.Collator in String.prototype.localeCompare()
In the very common case that no special constructor options are provided
for the Intl.Collator when calling localeCompare() on a string, we can
cache and reuse a default-constructed Intl.Collator, saving lots of time
and space.

This shaves a fair bit of load time off of https://wpt.fyi/ where they
use Array.prototype.sort() and localeCompare() to sort a big JSON thing.

Time spent in sort():
- Before: 1656 ms
- After: 135 ms
2025-01-23 21:38:19 +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/Intrinsics.h (Browse further)