LibJS: Make array_merge_sort() public
This commit is contained in:
parent
a4d0a6e1c1
commit
105c516a78
Notes:
sideshowbarker
2024-07-17 10:17:24 +09:00
Author: https://github.com/linusg Commit: https://github.com/SerenityOS/serenity/commit/105c516a78 Pull-request: https://github.com/SerenityOS/serenity/pull/14270 Reviewed-by: https://github.com/Lubrsi Reviewed-by: https://github.com/davidot ✅
2 changed files with 4 additions and 2 deletions
Userland/Libraries/LibJS/Runtime
|
@ -867,7 +867,7 @@ JS_DEFINE_NATIVE_FUNCTION(ArrayPrototype::reverse)
|
|||
return this_object;
|
||||
}
|
||||
|
||||
static ThrowCompletionOr<void> array_merge_sort(VM& vm, GlobalObject& global_object, FunctionObject* compare_func, MarkedVector<Value>& arr_to_sort)
|
||||
ThrowCompletionOr<void> array_merge_sort(VM& vm, GlobalObject& global_object, FunctionObject* compare_func, MarkedVector<Value>& arr_to_sort)
|
||||
{
|
||||
// FIXME: it would probably be better to switch to insertion sort for small arrays for
|
||||
// better performance
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2020, Andreas Kling <kling@serenityos.org>
|
||||
* Copyright (c) 2020-2021, Linus Groh <linusg@serenityos.org>
|
||||
* Copyright (c) 2020-2022, Linus Groh <linusg@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
@ -58,4 +58,6 @@ private:
|
|||
JS_DECLARE_NATIVE_FUNCTION(group_to_map);
|
||||
};
|
||||
|
||||
ThrowCompletionOr<void> array_merge_sort(VM&, GlobalObject&, FunctionObject* compare_func, MarkedVector<Value>& arr_to_sort);
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue