LibJS: Mark Value as a trivial type for AK collection purposes

It's perfectly fine to memcpy() a bunch of JS::Values around, and if
that helps Vector<Value> go faster, let's allow it.
This commit is contained in:
Andreas Kling 2024-05-07 20:00:37 +02:00
commit 55a4b0a21e
Notes: sideshowbarker 2024-07-17 11:33:34 +09:00

View file

@ -735,6 +735,7 @@ struct Formatter<JS::Value> : Formatter<StringView> {
template<>
struct Traits<JS::Value> : DefaultTraits<JS::Value> {
static unsigned hash(JS::Value value) { return Traits<u64>::hash(value.encoded()); }
static constexpr bool is_trivial() { return true; }
};
}