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:
parent
161298b5d1
commit
55a4b0a21e
1 changed files with 1 additions and 0 deletions
|
|
@ -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; }
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue