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

@ -26,11 +26,11 @@ public:
DOM::Element& last() { return *m_elements.last(); }
bool is_empty() const { return m_elements.is_empty(); }
void push(JS::NonnullGCPtr<DOM::Element> element) { m_elements.append(element); }
JS::NonnullGCPtr<DOM::Element> pop() { return *m_elements.take_last(); }
void push(GC::Ref<DOM::Element> element) { m_elements.append(element); }
GC::Ref<DOM::Element> pop() { return *m_elements.take_last(); }
void remove(DOM::Element const& element);
void replace(DOM::Element const& to_remove, JS::NonnullGCPtr<DOM::Element> to_add);
void insert_immediately_below(JS::NonnullGCPtr<DOM::Element> element_to_add, DOM::Element const& target);
void replace(DOM::Element const& to_remove, GC::Ref<DOM::Element> to_add);
void insert_immediately_below(GC::Ref<DOM::Element> element_to_add, DOM::Element const& target);
const DOM::Element& current_node() const { return *m_elements.last(); }
DOM::Element& current_node() { return *m_elements.last(); }
@ -51,14 +51,14 @@ public:
void pop_until_an_element_with_tag_name_has_been_popped(FlyString const& local_name);
JS::GCPtr<DOM::Element> topmost_special_node_below(DOM::Element const&);
GC::Ptr<DOM::Element> topmost_special_node_below(DOM::Element const&);
struct LastElementResult {
JS::GCPtr<DOM::Element> element;
GC::Ptr<DOM::Element> element;
ssize_t index;
};
LastElementResult last_element_with_tag_name(FlyString const&);
JS::GCPtr<DOM::Element> element_immediately_above(DOM::Element const&);
GC::Ptr<DOM::Element> element_immediately_above(DOM::Element const&);
void visit_edges(JS::Cell::Visitor&);
@ -66,7 +66,7 @@ private:
bool has_in_scope_impl(FlyString const& tag_name, Vector<FlyString> const&) const;
bool has_in_scope_impl(const DOM::Element& target_node, Vector<FlyString> const&) const;
Vector<JS::NonnullGCPtr<DOM::Element>> m_elements;
Vector<GC::Ref<DOM::Element>> m_elements;
};
}