/* * Copyright (c) 2022, Idan Horowitz * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include namespace JS::Intl { class CollatorCompareFunction : public NativeFunction { JS_OBJECT(CollatorCompareFunction, NativeFunction); public: static NonnullGCPtr create(Realm&, Collator&); virtual ThrowCompletionOr initialize(Realm&) override; virtual ~CollatorCompareFunction() override = default; virtual ThrowCompletionOr call() override; private: CollatorCompareFunction(Realm&, Collator&); virtual void visit_edges(Visitor&) override; NonnullGCPtr m_collator; // [[Collator]] }; double compare_strings(Collator&, Utf8View const& x, Utf8View const& y); }