LibJS: Implement the SortIndexedProperties AO

Also use it in array_merge_sort() instead of inlining the algorithm.
This commit is contained in:
Linus Groh 2022-06-13 07:55:25 +01:00
commit e2a5a27302
Notes: sideshowbarker 2024-07-17 10:17:11 +09:00
3 changed files with 56 additions and 44 deletions

View file

@ -52,5 +52,6 @@ private:
};
ThrowCompletionOr<double> compare_array_elements(GlobalObject&, Value x, Value y, FunctionObject* comparefn);
ThrowCompletionOr<MarkedVector<Value>> sort_indexed_properties(GlobalObject&, Object const&, size_t length, Function<ThrowCompletionOr<double>(Value, Value)> const& sort_compare, bool skip_holes);
}