LibJS: Add Value::to_{index,length,integer_or_infinity} abstract operations

We should pay more attention to using the well-defined abstract
operations from the spec rather than making up our own, often slightly
different rules. This is another step in that direction.
This commit is contained in:
Linus Groh 2020-12-02 13:23:51 +00:00 committed by Andreas Kling
commit eaa85969c4
Notes: sideshowbarker 2024-07-19 01:05:12 +09:00
3 changed files with 66 additions and 1 deletions

View file

@ -251,6 +251,9 @@ public:
double to_double(GlobalObject&) const;
i32 to_i32(GlobalObject&) const;
size_t to_size_t(GlobalObject&) const;
size_t to_length(GlobalObject&) const;
size_t to_index(GlobalObject&) const;
double to_integer_or_infinity(GlobalObject&) const;
bool to_boolean() const;
String to_string_without_side_effects() const;