#ifndef V8_INTL_SUPPORT
#error Internationalization is expected to be enabled.
#endif
#include "src/objects/js-collator.h"
#include "src/execution/isolate.h"
#include "src/objects/js-collator-inl.h"
#include "src/objects/js-locale.h"
#include "src/objects/managed-inl.h"
#include "src/objects/objects-inl.h"
#include "src/objects/option-utils.h"
#include "unicode/coll.h"
#include "unicode/locid.h"
#include "unicode/strenum.h"
#include "unicode/ucol.h"
#include "unicode/udata.h"
#include "unicode/uloc.h"
#include "unicode/utypes.h"
namespace v8 {
namespace internal {
namespace {
enum class Usage { … };
enum class Sensitivity { … };
enum class CaseFirst { … };
Maybe<CaseFirst> GetCaseFirst(Isolate* isolate, Handle<JSReceiver> options,
const char* method_name) { … }
void CreateDataPropertyForOptions(Isolate* isolate, Handle<JSObject> options,
Handle<String> key, const char* value) { … }
void CreateDataPropertyForOptions(Isolate* isolate, Handle<JSObject> options,
Handle<String> key, bool value) { … }
}
Handle<JSObject> JSCollator::ResolvedOptions(
Isolate* isolate, DirectHandle<JSCollator> collator) { … }
namespace {
CaseFirst ToCaseFirst(const char* str) { … }
UColAttributeValue ToUColAttributeValue(CaseFirst case_first) { … }
void SetNumericOption(icu::Collator* icu_collator, bool numeric) { … }
void SetCaseFirstOption(icu::Collator* icu_collator, CaseFirst case_first) { … }
}
MaybeHandle<JSCollator> JSCollator::New(Isolate* isolate, DirectHandle<Map> map,
Handle<Object> locales,
Handle<Object> options_obj,
const char* service) { … }
namespace {
class CollatorAvailableLocales { … };
}
const std::set<std::string>& JSCollator::GetAvailableLocales() { … }
}
}