#ifndef V8_INTL_SUPPORT
#error Internationalization is expected to be enabled.
#endif
#include "src/objects/js-plural-rules.h"
#include "src/execution/isolate-inl.h"
#include "src/objects/intl-objects.h"
#include "src/objects/js-number-format.h"
#include "src/objects/js-plural-rules-inl.h"
#include "src/objects/managed-inl.h"
#include "src/objects/option-utils.h"
#include "unicode/locid.h"
#include "unicode/numberformatter.h"
#include "unicode/numberrangeformatter.h"
#include "unicode/plurrule.h"
#include "unicode/unumberformatter.h"
namespace v8 {
namespace internal {
namespace {
bool CreateICUPluralRules(Isolate* isolate, const icu::Locale& icu_locale,
JSPluralRules::Type type,
std::unique_ptr<icu::PluralRules>* pl) { … }
}
Handle<String> JSPluralRules::TypeAsString() const { … }
MaybeHandle<JSPluralRules> JSPluralRules::New(Isolate* isolate,
DirectHandle<Map> map,
Handle<Object> locales,
Handle<Object> options_obj) { … }
MaybeHandle<String> JSPluralRules::ResolvePlural(
Isolate* isolate, DirectHandle<JSPluralRules> plural_rules, double number) { … }
MaybeHandle<String> JSPluralRules::ResolvePluralRange(
Isolate* isolate, DirectHandle<JSPluralRules> plural_rules, double x,
double y) { … }
namespace {
void CreateDataPropertyForOptions(Isolate* isolate, Handle<JSObject> options,
Handle<Object> value, const char* key) { … }
void CreateDataPropertyForOptions(Isolate* isolate, Handle<JSObject> options,
int value, const char* key) { … }
}
Handle<JSObject> JSPluralRules::ResolvedOptions(
Isolate* isolate, DirectHandle<JSPluralRules> plural_rules) { … }
namespace {
class PluralRulesAvailableLocales { … };
}
const std::set<std::string>& JSPluralRules::GetAvailableLocales() { … }
}
}