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

@ -4,22 +4,22 @@
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <LibJS/Heap/Heap.h>
#include <LibGC/Heap.h>
#include <LibJS/Runtime/VM.h>
#include <LibWeb/Fetch/Infrastructure/FetchAlgorithms.h>
namespace Web::Fetch::Infrastructure {
JS_DEFINE_ALLOCATOR(FetchAlgorithms);
GC_DEFINE_ALLOCATOR(FetchAlgorithms);
JS::NonnullGCPtr<FetchAlgorithms> FetchAlgorithms::create(JS::VM& vm, Input input)
GC::Ref<FetchAlgorithms> FetchAlgorithms::create(JS::VM& vm, Input input)
{
auto process_request_body_chunk_length = JS::create_heap_function(vm.heap(), move(input.process_request_body_chunk_length));
auto process_request_end_of_body = JS::create_heap_function(vm.heap(), move(input.process_request_end_of_body));
auto process_early_hints_response = JS::create_heap_function(vm.heap(), move(input.process_early_hints_response));
auto process_response = JS::create_heap_function(vm.heap(), move(input.process_response));
auto process_response_end_of_body = JS::create_heap_function(vm.heap(), move(input.process_response_end_of_body));
auto process_response_consume_body = JS::create_heap_function(vm.heap(), move(input.process_response_consume_body));
auto process_request_body_chunk_length = GC::create_function(vm.heap(), move(input.process_request_body_chunk_length));
auto process_request_end_of_body = GC::create_function(vm.heap(), move(input.process_request_end_of_body));
auto process_early_hints_response = GC::create_function(vm.heap(), move(input.process_early_hints_response));
auto process_response = GC::create_function(vm.heap(), move(input.process_response));
auto process_response_end_of_body = GC::create_function(vm.heap(), move(input.process_response_end_of_body));
auto process_response_consume_body = GC::create_function(vm.heap(), move(input.process_response_consume_body));
return vm.heap().allocate<FetchAlgorithms>(
process_request_body_chunk_length,
process_request_end_of_body,