mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-04 15:19:42 +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
|
@ -11,9 +11,9 @@
|
|||
#include <AK/Optional.h>
|
||||
#include <AK/String.h>
|
||||
#include <AK/StringView.h>
|
||||
#include <LibGC/CellAllocator.h>
|
||||
#include <LibJS/Forward.h>
|
||||
#include <LibJS/Heap/Cell.h>
|
||||
#include <LibJS/Heap/CellAllocator.h>
|
||||
#include <LibJS/Runtime/Completion.h>
|
||||
#include <LibJS/Runtime/Utf16String.h>
|
||||
#include <LibJS/Runtime/Value.h>
|
||||
|
@ -21,17 +21,17 @@
|
|||
namespace JS {
|
||||
|
||||
class PrimitiveString final : public Cell {
|
||||
JS_CELL(PrimitiveString, Cell);
|
||||
JS_DECLARE_ALLOCATOR(PrimitiveString);
|
||||
GC_CELL(PrimitiveString, Cell);
|
||||
GC_DECLARE_ALLOCATOR(PrimitiveString);
|
||||
|
||||
public:
|
||||
[[nodiscard]] static NonnullGCPtr<PrimitiveString> create(VM&, Utf16String);
|
||||
[[nodiscard]] static NonnullGCPtr<PrimitiveString> create(VM&, String);
|
||||
[[nodiscard]] static NonnullGCPtr<PrimitiveString> create(VM&, FlyString const&);
|
||||
[[nodiscard]] static NonnullGCPtr<PrimitiveString> create(VM&, ByteString);
|
||||
[[nodiscard]] static NonnullGCPtr<PrimitiveString> create(VM&, DeprecatedFlyString const&);
|
||||
[[nodiscard]] static NonnullGCPtr<PrimitiveString> create(VM&, PrimitiveString&, PrimitiveString&);
|
||||
[[nodiscard]] static NonnullGCPtr<PrimitiveString> create(VM&, StringView);
|
||||
[[nodiscard]] static GC::Ref<PrimitiveString> create(VM&, Utf16String);
|
||||
[[nodiscard]] static GC::Ref<PrimitiveString> create(VM&, String);
|
||||
[[nodiscard]] static GC::Ref<PrimitiveString> create(VM&, FlyString const&);
|
||||
[[nodiscard]] static GC::Ref<PrimitiveString> create(VM&, ByteString);
|
||||
[[nodiscard]] static GC::Ref<PrimitiveString> create(VM&, DeprecatedFlyString const&);
|
||||
[[nodiscard]] static GC::Ref<PrimitiveString> create(VM&, PrimitiveString&, PrimitiveString&);
|
||||
[[nodiscard]] static GC::Ref<PrimitiveString> create(VM&, StringView);
|
||||
|
||||
virtual ~PrimitiveString();
|
||||
|
||||
|
@ -69,8 +69,8 @@ private:
|
|||
|
||||
mutable bool m_is_rope { false };
|
||||
|
||||
mutable GCPtr<PrimitiveString> m_lhs;
|
||||
mutable GCPtr<PrimitiveString> m_rhs;
|
||||
mutable GC::Ptr<PrimitiveString> m_lhs;
|
||||
mutable GC::Ptr<PrimitiveString> m_rhs;
|
||||
|
||||
mutable Optional<String> m_utf8_string;
|
||||
mutable Optional<ByteString> m_byte_string;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue