1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 08:07:34 +00:00

LibJS: Make Value::to_property_key() return a JS::PropertyKey

Instead of returning JS::StringOrSymbol, which is a space-optimized type
used in Shape property tables, this now returns JS::PropertyKey which is
*not* space-optimized, but has other niceties like optimized storage of
numeric ("indexed") properties.
This commit is contained in:
Andreas Kling 2021-10-24 16:25:39 +02:00
parent 7ccb8c8609
commit 65a7296b8f
3 changed files with 3 additions and 3 deletions

View file

@ -314,7 +314,7 @@ public:
ThrowCompletionOr<i64> to_bigint_int64(GlobalObject&) const;
ThrowCompletionOr<u64> to_bigint_uint64(GlobalObject&) const;
ThrowCompletionOr<double> to_double(GlobalObject&) const;
ThrowCompletionOr<StringOrSymbol> to_property_key(GlobalObject&) const;
ThrowCompletionOr<PropertyKey> to_property_key(GlobalObject&) const;
ThrowCompletionOr<i32> to_i32(GlobalObject& global_object) const;
ThrowCompletionOr<u32> to_u32(GlobalObject&) const;
ThrowCompletionOr<i16> to_i16(GlobalObject&) const;