mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-04 23:29:52 +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
|
@ -7,8 +7,8 @@
|
|||
#pragma once
|
||||
|
||||
#include <AK/NonnullRefPtr.h>
|
||||
#include <LibJS/Heap/GCPtr.h>
|
||||
#include <LibJS/Heap/Handle.h>
|
||||
#include <LibGC/Ptr.h>
|
||||
#include <LibGC/Root.h>
|
||||
#include <LibJS/ParserError.h>
|
||||
#include <LibJS/Runtime/Realm.h>
|
||||
|
||||
|
@ -16,8 +16,8 @@ namespace JS {
|
|||
|
||||
// 16.1.4 Script Records, https://tc39.es/ecma262/#sec-script-records
|
||||
class Script final : public Cell {
|
||||
JS_CELL(Script, Cell);
|
||||
JS_DECLARE_ALLOCATOR(Script);
|
||||
GC_CELL(Script, Cell);
|
||||
GC_DECLARE_ALLOCATOR(Script);
|
||||
|
||||
public:
|
||||
struct HostDefined {
|
||||
|
@ -27,7 +27,7 @@ public:
|
|||
};
|
||||
|
||||
virtual ~Script() override;
|
||||
static Result<NonnullGCPtr<Script>, Vector<ParserError>> parse(StringView source_text, Realm&, StringView filename = {}, HostDefined* = nullptr, size_t line_number_offset = 1);
|
||||
static Result<GC::Ref<Script>, Vector<ParserError>> parse(StringView source_text, Realm&, StringView filename = {}, HostDefined* = nullptr, size_t line_number_offset = 1);
|
||||
|
||||
Realm& realm() { return *m_realm; }
|
||||
Program const& parse_node() const { return *m_parse_node; }
|
||||
|
@ -42,7 +42,7 @@ private:
|
|||
|
||||
virtual void visit_edges(Cell::Visitor&) override;
|
||||
|
||||
GCPtr<Realm> m_realm; // [[Realm]]
|
||||
GC::Ptr<Realm> m_realm; // [[Realm]]
|
||||
NonnullRefPtr<Program> m_parse_node; // [[ECMAScriptCode]]
|
||||
Vector<ModuleWithSpecifier> m_loaded_modules; // [[LoadedModules]]
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue