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

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
parent 5ddf0b0c99
commit e2a5a27302
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);
}