1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 19:47:44 +00:00

LibJS: Add the Set built-in object

This commit is contained in:
Idan Horowitz 2021-06-09 00:08:47 +03:00 committed by Linus Groh
parent b17a282b4b
commit 670be04c81
15 changed files with 359 additions and 30 deletions

View file

@ -253,6 +253,8 @@ public:
i32 as_i32() const;
u32 as_u32() const;
u64 encoded() const { return m_value.encoded; }
String to_string(GlobalObject&, bool legacy_null_to_empty_string = false) const;
PrimitiveString* to_primitive_string(GlobalObject&);
Value to_primitive(GlobalObject&, PreferredType preferred_type = PreferredType::Default) const;
@ -301,7 +303,9 @@ private:
Accessor* as_accessor;
BigInt* as_bigint;
NativeProperty* as_native_property;
} m_value;
u64 encoded;
} m_value { .encoded = 0 };
};
inline Value js_undefined()