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
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

@ -19,7 +19,7 @@ namespace JS::Intl {
class NumberFormatBase : public Object {
JS_OBJECT(NumberFormatBase, Object);
JS_DECLARE_ALLOCATOR(NumberFormatBase);
GC_DECLARE_ALLOCATOR(NumberFormatBase);
public:
enum class ComputedRoundingPriority {
@ -99,7 +99,7 @@ private:
class NumberFormat final : public NumberFormatBase {
JS_OBJECT(NumberFormat, NumberFormatBase);
JS_DECLARE_ALLOCATOR(NumberFormat);
GC_DECLARE_ALLOCATOR(NumberFormat);
public:
static constexpr auto relevant_extension_keys()
@ -180,17 +180,17 @@ private:
Unicode::Notation m_notation; // [[Notation]]
Optional<Unicode::CompactDisplay> m_compact_display; // [[CompactDisplay]]
Unicode::SignDisplay m_sign_display; // [[SignDisplay]]
GCPtr<NativeFunction> m_bound_format; // [[BoundFormat]]
GC::Ptr<NativeFunction> m_bound_format; // [[BoundFormat]]
};
int currency_digits(StringView currency);
String format_numeric_to_string(NumberFormatBase const& intl_object, MathematicalValue const& number);
Vector<Unicode::NumberFormat::Partition> partition_number_pattern(NumberFormat const&, MathematicalValue const& number);
String format_numeric(NumberFormat const&, MathematicalValue const& number);
NonnullGCPtr<Array> format_numeric_to_parts(VM&, NumberFormat const&, MathematicalValue const& number);
GC::Ref<Array> format_numeric_to_parts(VM&, NumberFormat const&, MathematicalValue const& number);
ThrowCompletionOr<MathematicalValue> to_intl_mathematical_value(VM&, Value value);
ThrowCompletionOr<Vector<Unicode::NumberFormat::Partition>> partition_number_range_pattern(VM&, NumberFormat const&, MathematicalValue const& start, MathematicalValue const& end);
ThrowCompletionOr<String> format_numeric_range(VM&, NumberFormat const&, MathematicalValue const& start, MathematicalValue const& end);
ThrowCompletionOr<NonnullGCPtr<Array>> format_numeric_range_to_parts(VM&, NumberFormat const&, MathematicalValue const& start, MathematicalValue const& end);
ThrowCompletionOr<GC::Ref<Array>> format_numeric_range_to_parts(VM&, NumberFormat const&, MathematicalValue const& start, MathematicalValue const& end);
}