mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-12 22:22:55 +00:00
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:
parent
ce23efc5f6
commit
f87041bf3a
Notes:
github-actions[bot]
2024-11-15 13:50:17 +00:00
Author: https://github.com/shannonbooth
Commit: f87041bf3a
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2345
1722 changed files with 9939 additions and 9906 deletions
|
@ -8,9 +8,9 @@
|
|||
#pragma once
|
||||
|
||||
#include <AK/Optional.h>
|
||||
#include <LibGC/Ptr.h>
|
||||
#include <LibGC/Root.h>
|
||||
#include <LibJS/Forward.h>
|
||||
#include <LibJS/Heap/GCPtr.h>
|
||||
#include <LibJS/Heap/Handle.h>
|
||||
#include <LibWasm/AbstractMachine/AbstractMachine.h>
|
||||
#include <LibWeb/Bindings/ExceptionOrUtils.h>
|
||||
#include <LibWeb/Bindings/PlatformObject.h>
|
||||
|
@ -20,10 +20,10 @@ namespace Web::WebAssembly {
|
|||
|
||||
class Instance : public Bindings::PlatformObject {
|
||||
WEB_PLATFORM_OBJECT(Instance, Bindings::PlatformObject);
|
||||
JS_DECLARE_ALLOCATOR(Instance);
|
||||
GC_DECLARE_ALLOCATOR(Instance);
|
||||
|
||||
public:
|
||||
static WebIDL::ExceptionOr<JS::NonnullGCPtr<Instance>> construct_impl(JS::Realm&, Module& module, Optional<JS::Handle<JS::Object>>& import_object);
|
||||
static WebIDL::ExceptionOr<GC::Ref<Instance>> construct_impl(JS::Realm&, Module& module, Optional<GC::Root<JS::Object>>& import_object);
|
||||
|
||||
Object const* exports() const { return m_exports.ptr(); }
|
||||
|
||||
|
@ -33,11 +33,11 @@ private:
|
|||
virtual void initialize(JS::Realm&) override;
|
||||
virtual void visit_edges(Visitor&) override;
|
||||
|
||||
JS::NonnullGCPtr<Object> m_exports;
|
||||
GC::Ref<Object> m_exports;
|
||||
NonnullOwnPtr<Wasm::ModuleInstance> m_module_instance;
|
||||
HashMap<Wasm::FunctionAddress, JS::GCPtr<JS::FunctionObject>> m_function_instances;
|
||||
HashMap<Wasm::MemoryAddress, JS::GCPtr<WebAssembly::Memory>> m_memory_instances;
|
||||
HashMap<Wasm::TableAddress, JS::GCPtr<WebAssembly::Table>> m_table_instances;
|
||||
HashMap<Wasm::FunctionAddress, GC::Ptr<JS::FunctionObject>> m_function_instances;
|
||||
HashMap<Wasm::MemoryAddress, GC::Ptr<WebAssembly::Memory>> m_memory_instances;
|
||||
HashMap<Wasm::TableAddress, GC::Ptr<WebAssembly::Table>> m_table_instances;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue