LibGC+Everywhere: Factor out a LibGC from LibJS

Resulting in a massive rename across almost everywhere! Alongside the
namespace change, we now have the following names:

 * JS::NonnullGCPtr -> GC::Ref
 * JS::GCPtr -> GC::Ptr
 * JS::HeapFunction -> GC::Function
 * JS::CellImpl -> GC::Cell
 * JS::Handle -> GC::Root
This commit is contained in:
Shannon Booth 2024-11-15 04:01:23 +13:00 committed by Andreas Kling
parent ce23efc5f6
commit f87041bf3a
Notes: github-actions[bot] 2024-11-15 13:50:17 +00:00
1722 changed files with 9939 additions and 9906 deletions

View file

@ -19,7 +19,7 @@ namespace Web::WebIDL {
ErrorOr<ByteBuffer> get_buffer_source_copy(JS::Object const& buffer_source);
JS::Completion call_user_object_operation(WebIDL::CallbackType& callback, String const& operation_name, Optional<JS::Value> this_argument, JS::MarkedVector<JS::Value> args);
JS::Completion call_user_object_operation(WebIDL::CallbackType& callback, String const& operation_name, Optional<JS::Value> this_argument, GC::MarkedVector<JS::Value> args);
// https://webidl.spec.whatwg.org/#call-a-user-objects-operation
template<typename... Args>
@ -27,13 +27,13 @@ JS::Completion call_user_object_operation(WebIDL::CallbackType& callback, String
{
auto& function_object = callback.callback;
JS::MarkedVector<JS::Value> arguments_list { function_object->heap() };
GC::MarkedVector<JS::Value> arguments_list { function_object->heap() };
(arguments_list.append(forward<Args>(args)), ...);
return call_user_object_operation(callback, operation_name, move(this_argument), move(arguments_list));
}
JS::Completion invoke_callback(WebIDL::CallbackType& callback, Optional<JS::Value> this_argument, JS::MarkedVector<JS::Value> args);
JS::Completion invoke_callback(WebIDL::CallbackType& callback, Optional<JS::Value> this_argument, GC::MarkedVector<JS::Value> args);
// https://webidl.spec.whatwg.org/#invoke-a-callback-function
template<typename... Args>
@ -41,13 +41,13 @@ JS::Completion invoke_callback(WebIDL::CallbackType& callback, Optional<JS::Valu
{
auto& function_object = callback.callback;
JS::MarkedVector<JS::Value> arguments_list { function_object->heap() };
GC::MarkedVector<JS::Value> arguments_list { function_object->heap() };
(arguments_list.append(forward<Args>(args)), ...);
return invoke_callback(callback, move(this_argument), move(arguments_list));
}
JS::Completion construct(WebIDL::CallbackType& callback, JS::MarkedVector<JS::Value> args);
JS::Completion construct(WebIDL::CallbackType& callback, GC::MarkedVector<JS::Value> args);
// https://webidl.spec.whatwg.org/#construct-a-callback-function
template<typename... Args>
@ -55,7 +55,7 @@ JS::Completion construct(WebIDL::CallbackType& callback, Args&&... args)
{
auto& function_object = callback.callback;
JS::MarkedVector<JS::Value> arguments_list { function_object->heap() };
GC::MarkedVector<JS::Value> arguments_list { function_object->heap() };
(arguments_list.append(forward<Args>(args)), ...);
return construct(callback, move(arguments_list));