chromium/v8/src/objects/js-collator.cc

// Copyright 2018 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef V8_INTL_SUPPORT
#error Internationalization is expected to be enabled.
#endif  // V8_INTL_SUPPORT

#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 for "caseFirst" option.
enum class CaseFirst {};

Maybe<CaseFirst> GetCaseFirst(Isolate* isolate, Handle<JSReceiver> options,
                              const char* method_name) {}

// TODO(gsathya): Consider internalizing the value strings.
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) {}

}  // anonymous namespace

// static
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) {}

}  // anonymous namespace

// static
MaybeHandle<JSCollator> JSCollator::New(Isolate* isolate, DirectHandle<Map> map,
                                        Handle<Object> locales,
                                        Handle<Object> options_obj,
                                        const char* service) {}

namespace {

class CollatorAvailableLocales {};

}  // namespace

const std::set<std::string>& JSCollator::GetAvailableLocales() {}

}  // namespace internal
}  // namespace v8