/arkcompiler/ets_runtime/ecmascript/tests/ |
D | js_locale_test.cpp | 112 EXPECT_FALSE(JSLocale::IsPrivateSubTag(result, result.length())); in HWTEST_F_L0() 115 EXPECT_TRUE(JSLocale::IsPrivateSubTag(result, result.length())); in HWTEST_F_L0() 118 EXPECT_TRUE(JSLocale::IsPrivateSubTag(result, result.length())); in HWTEST_F_L0() 133 JSHandle<JSLocale> locale = in HWTEST_F_L0() 134 … JSHandle<JSLocale>::Cast(factory->NewJSObjectByConstructor(JSHandle<JSFunction>(ctor), ctor)); in HWTEST_F_L0() 137 factory->NewJSIntlIcuData(locale, icuLocale, JSLocale::FreeIcuLocale); in HWTEST_F_L0() 155 EXPECT_TRUE(JSLocale::IsValidTimeZoneName(*timeZone)); in HWTEST_F_L0() 160 EXPECT_FALSE(JSLocale::IsValidTimeZoneName(*timeZone)); in HWTEST_F_L0() 182 …JSHandle<JSObject> recordObj = JSLocale::PutElement(thread, index, jsArray, fieldTypeString, value… in HWTEST_F_L0() 200 std::string numberingSystem = JSLocale::GetNumberingSystem(icuLocale1); in HWTEST_F_L0() [all …]
|
D | js_list_format_test.cpp | 117 JSHandle<JSLocale> locales = in CreateJSListFormatterTest() 118 …JSHandle<JSLocale>::Cast(factory->NewJSObjectByConstructor(JSHandle<JSFunction>(localeCtor), local… in CreateJSListFormatterTest() 123 factory->NewJSIntlIcuData(locales, icuLocale, JSLocale::FreeIcuLocale); in CreateJSListFormatterTest() 162 JSHandle<JSLocale> locales = in HWTEST_F_L0() 163 …JSHandle<JSLocale>::Cast(factory->NewJSObjectByConstructor(JSHandle<JSFunction>(localeCtor), local… in HWTEST_F_L0() 168 factory->NewJSIntlIcuData(locales, icuLocale, JSLocale::FreeIcuLocale); in HWTEST_F_L0()
|
D | js_date_time_format_test.cpp | 206 JSHandle<JSLocale> locales = in HWTEST_F_L0() 207 …JSHandle<JSLocale>::Cast(factory->NewJSObjectByConstructor(JSHandle<JSFunction>(localeCtor), local… in HWTEST_F_L0() 209 factory->NewJSIntlIcuData(locales, icuLocale, JSLocale::FreeIcuLocale); in HWTEST_F_L0() 334 JSHandle<JSLocale> locales = in CreateDateTimeFormatTest() 335 …JSHandle<JSLocale>::Cast(factory->NewJSObjectByConstructor(JSHandle<JSFunction>(localeCtor), local… in CreateDateTimeFormatTest() 340 factory->NewJSIntlIcuData(locales, icuLocale, JSLocale::FreeIcuLocale); in CreateDateTimeFormatTest() 676 …JSHandle<TaggedArray> availableLocales = JSLocale::ConstructLocaleList(thread, availableStringLoca… in HWTEST_F_L0() 688 JSHandle<JSLocale> locales = in HWTEST_F_L0() 689 …JSHandle<JSLocale>::Cast(factory->NewJSObjectByConstructor(JSHandle<JSFunction>(localeCtor), local… in HWTEST_F_L0() 691 factory->NewJSIntlIcuData(locales, icuLocale, JSLocale::FreeIcuLocale); in HWTEST_F_L0()
|
D | locale_helper_test.cpp | 101 JSHandle<JSLocale> jsLocale = in HWTEST_F_L0() 102 … JSHandle<JSLocale>::Cast(factory->NewJSObjectByConstructor(JSHandle<JSFunction>(ctor), ctor)); in HWTEST_F_L0() 105 factory->NewJSIntlIcuData(jsLocale, icuLocale, JSLocale::FreeIcuLocale); in HWTEST_F_L0()
|
D | dump_test.cpp | 666 CHECK_DUMP_FIELDS(JSObject::SIZE, JSLocale::SIZE, 1U); in HWTEST_F_L0() 667 NEW_OBJECT_AND_DUMP(JSLocale, JS_LOCALE) in HWTEST_F_L0()
|
/arkcompiler/ets_runtime/ecmascript/builtins/ |
D | builtins_locale.cpp | 44 JSHandle<JSLocale> locale =JSHandle<JSLocale>::Cast(newObject); in LocaleConstructor() 61 icu::Locale *icuLocale = (JSHandle<JSLocale>::Cast(tag))->GetIcuLocale(); in LocaleConstructor() 78 … JSHandle<JSLocale> result = JSLocale::InitializeLocale(thread, locale, localeString, optionsObj); in LocaleConstructor() 97 JSHandle<JSLocale> locale = JSHandle<JSLocale>::Cast(loc); in Maximize() 111 factory->NewJSIntlIcuData(JSHandle<JSLocale>::Cast(obj), source, JSLocale::FreeIcuLocale); in Maximize() 130 JSHandle<JSLocale> locale = JSHandle<JSLocale>::Cast(loc); in Minimize() 146 factory->NewJSIntlIcuData(JSHandle<JSLocale>::Cast(obj), source, JSLocale::FreeIcuLocale); in Minimize() 162 JSHandle<EcmaString> result = JSLocale::ToString(thread, JSHandle<JSLocale>::Cast(loc)); in ToString() 179 JSHandle<JSLocale> locale = JSHandle<JSLocale>::Cast(loc); in GetBaseName() 197 JSHandle<JSLocale> locale = JSHandle<JSLocale>::Cast(loc); in GetCalendar() [all …]
|
D | builtins_relative_time_format.cpp | 75 …JSHandle<TaggedArray> availableLocales = JSLocale::ConstructLocaleList(thread, availableStringLoca… in SupportedLocalesOf() 84 …JSHandle<JSArray> result = JSLocale::SupportedLocales(thread, availableLocales, requestedLocales, … in SupportedLocalesOf()
|
D | builtins_plural_rules.cpp | 73 …JSHandle<JSArray> result = JSLocale::SupportedLocales(thread, availableLocales, requestedLocales, … in SupportedLocalesOf()
|
D | builtins_displaynames.cpp | 75 …JSHandle<JSArray> result = JSLocale::SupportedLocales(thread, availableLocales, requestedLocales, … in SupportedLocalesOf()
|
D | builtins_collator.cpp | 79 …JSHandle<JSArray> result = JSLocale::SupportedLocales(thread, availableLocales, requestedLocales, … in SupportedLocalesOf()
|
D | builtins_list_format.cpp | 76 …JSHandle<JSArray> result = JSLocale::SupportedLocales(thread, availableLocales, requestedLocales, … in SupportedLocalesOf()
|
D | builtins_number_format.cpp | 99 …JSHandle<JSArray> result = JSLocale::SupportedLocales(thread, availableLocales, requestedLocales, … in SupportedLocalesOf()
|
D | builtins_date_time_format.cpp | 97 …JSHandle<JSArray> result = JSLocale::SupportedLocales(thread, availableLocales, requestedLocales, … in SupportedLocalesOf()
|
/arkcompiler/ets_runtime/ecmascript/builtins/tests/ |
D | builtins_locale_test.cpp | 155 JSHandle<JSLocale> jsLocale = JSHandle<JSLocale>(thread, JSLocaleCreateWithOptionTest(thread)); in HWTEST_F_L0() 174 JSHandle<JSLocale> jsLocale = JSHandle<JSLocale>(thread, JSLocaleCreateWithOptionTest(thread)); in HWTEST_F_L0() 191 JSHandle<JSLocale> jsLocale = JSHandle<JSLocale>(thread, JSLocaleCreateWithOptionTest(thread)); in HWTEST_F_L0() 208 JSHandle<JSLocale> jsLocale = JSHandle<JSLocale>(thread, JSLocaleCreateWithOptionTest(thread)); in HWTEST_F_L0() 225 JSHandle<JSLocale> jsLocale = JSHandle<JSLocale>(thread, JSLocaleCreateWithOptionTest(thread)); in HWTEST_F_L0() 242 JSHandle<JSLocale> jsLocale = JSHandle<JSLocale>(thread, JSLocaleCreateWithOptionTest(thread)); in HWTEST_F_L0() 259 JSHandle<JSLocale> jsLocale = JSHandle<JSLocale>(thread, JSLocaleCreateWithOptionTest(thread)); in HWTEST_F_L0() 274 JSHandle<JSLocale> jsLocale = JSHandle<JSLocale>(thread, JSLocaleCreateWithOptionTest(thread)); in HWTEST_F_L0() 291 JSHandle<JSLocale> jsLocale = JSHandle<JSLocale>(thread, JSLocaleCreateWithOptionTest(thread)); in HWTEST_F_L0() 308 JSHandle<JSLocale> jsLocale = JSHandle<JSLocale>(thread, JSLocaleCreateWithOptionTest(thread)); in HWTEST_F_L0() [all …]
|
/arkcompiler/ets_runtime/ecmascript/ |
D | js_locale.cpp | 44 bool JSLocale::IsValidTimeZoneName(const icu::TimeZone &tz) in IsValidTimeZoneName() 56 JSHandle<EcmaString> JSLocale::LookupMatcher(JSThread *thread, const JSHandle<TaggedArray> &availab… in LookupMatcher() 126 JSHandle<EcmaString> JSLocale::BestFitMatcher(JSThread *thread, const JSHandle<TaggedArray> &availa… in BestFitMatcher() 152 JSHandle<TaggedArray> JSLocale::LookupSupportedLocales(JSThread *thread, const JSHandle<TaggedArray… in LookupSupportedLocales() 181 JSHandle<TaggedArray> JSLocale::BestFitSupportedLocales(JSThread *thread, const JSHandle<TaggedArra… in BestFitSupportedLocales() 216 JSHandle<JSArray> JSLocale::SupportedLocales(JSThread *thread, const JSHandle<TaggedArray> &availab… in SupportedLocales() 249 JSHandle<JSTaggedValue> JSLocale::GetOption(JSThread *thread, const JSHandle<JSObject> &options, in GetOption() 299 bool JSLocale::GetOptionOfString(JSThread *thread, const JSHandle<JSObject> &options, in GetOptionOfString() 333 int JSLocale::DefaultNumberOption(JSThread *thread, const JSHandle<JSTaggedValue> &value, int minim… in DefaultNumberOption() 354 int JSLocale::GetNumberOption(JSThread *thread, const JSHandle<JSObject> &options, in GetNumberOption() [all …]
|
D | js_number_format.cpp | 268 auto style = JSLocale::GetOptionOfString<StyleOption>( in SetNumberFormatUnitOptions() 281 …JSLocale::GetOption(thread, optionsObject, property, OptionType::STRING, undefinedValue, undefined… in SetNumberFormatUnitOptions() 292 if (!JSLocale::IsWellFormedCurrencyCode(currencyCStr)) { in SetNumberFormatUnitOptions() 305 auto currencyDisplay = JSLocale::GetOptionOfString<CurrencyDisplayOption>( in SetNumberFormatUnitOptions() 315 auto currencySign = JSLocale::GetOptionOfString<CurrencySignOption>( in SetNumberFormatUnitOptions() 324 …JSLocale::GetOption(thread, optionsObject, property, OptionType::STRING, undefinedValue, undefined… in SetNumberFormatUnitOptions() 350 auto unitDisplay = JSLocale::GetOptionOfString<UnitDisplayOption>( in SetNumberFormatUnitOptions() 463 auto matcher = JSLocale::GetOptionOfString<LocaleMatcherOption>( in InitializeNumberFormat() 472 …JSLocale::GetOption(thread, optionsObject, property, OptionType::STRING, undefinedValue, undefined… in InitializeNumberFormat() 486 if (!JSLocale::IsNormativeNumberingSystem(numberingSystemStr)) { in InitializeNumberFormat() [all …]
|
D | js_relative_time_format.cpp | 47 … JSLocale::GetOptionOfString(thread, rtfOptions, globalConst->GetHandledLocaleMatcherString(), in InitializeRelativeTimeFormat() 56 …JSLocale::GetOption(thread, rtfOptions, property, OptionType::STRING, undefinedValue, undefinedVal… in InitializeRelativeTimeFormat() 67 if (!JSLocale::IsNormativeNumberingSystem(numberingSystemStdStr)) { in InitializeRelativeTimeFormat() 81 availableLocales = JSLocale::ConstructLocaleList(thread, availableStringLocales); in InitializeRelativeTimeFormat() 85 …JSLocale::ResolveLocale(thread, availableLocales, requestedLocales, matcher, relevantExtensionKeys… in InitializeRelativeTimeFormat() 99 if (JSLocale::IsWellNumberingSystem(numberingSystemStdStr)) { in InitializeRelativeTimeFormat() 107 RelativeStyleOption styleOption = JSLocale::GetOptionOfString(thread, rtfOptions, property, in InitializeRelativeTimeFormat() 118 …JSLocale::GetOptionOfString(thread, rtfOptions, property, {NumericOption::ALWAYS, NumericOption::A… in InitializeRelativeTimeFormat() 160 std::string numberingSystem = JSLocale::GetNumberingSystem(icuLocale); in InitializeRelativeTimeFormat() 424 …JSLocale::PutElement(thread, index++, array, typeString, JSHandle<JSTaggedValue>::Cast(substring)); in FormatToArray() [all …]
|
D | js_locale.h | 148 class JSLocale : public JSObject { 150 static JSLocale *Cast(TaggedObject *object) in Cast() 153 return static_cast<JSLocale *>(object); in Cast() 490 static JSHandle<JSLocale> InitializeLocale(JSThread *thread, const JSHandle<JSLocale> &locale, 494 …static JSHandle<EcmaString> NormalizeKeywordValue(JSThread *thread, const JSHandle<JSLocale> &loca… 497 static JSHandle<EcmaString> ToString(JSThread *thread, const JSHandle<JSLocale> &locale); 548 … thread, JSTaggedValue(JSLocale::DefaultNumberOption(thread, mnsd, 1, MAX_DIGITS, 1))); in SetNumberFormatDigitOptions() 551 …JSTaggedValue(JSLocale::DefaultNumberOption(thread, mxsd, mnsd->GetInt(), MAX_DIGITS, MAX_DIGITS))… in SetNumberFormatDigitOptions() 563 … JSTaggedValue(JSLocale::DefaultNumberOption(thread, mxfd, 0, MAX_FRACTION_DIGITS, mxfdDefault)); in SetNumberFormatDigitOptions() 574 … thread, JSTaggedValue(JSLocale::DefaultNumberOption(thread, mxfd, mnfd->GetInt(), in SetNumberFormatDigitOptions() [all …]
|
D | js_collator.cpp | 52 …JSHandle<TaggedArray> availableLocales = JSLocale::ConstructLocaleList(thread, availableStringLoca… in GetAvailableLocales() 104 …auto usage = JSLocale::GetOptionOfString<UsageOption>(thread, optionsObject, globalConst->GetHandl… in InitializeCollator() 111 auto matcher = JSLocale::GetOptionOfString<LocaleMatcherOption>( in InitializeCollator() 121 …JSLocale::GetOption(thread, optionsObject, globalConst->GetHandledCollationString(), OptionType::S… in InitializeCollator() 129 if (!JSLocale::IsWellAlphaNumList(collationStr)) { in InitializeCollator() 137 …JSLocale::GetOptionOfBool(thread, optionsObject, globalConst->GetHandledNumericString(), false, &n… in InitializeCollator() 142 CaseFirstOption caseFirst = JSLocale::GetOptionOfString<CaseFirstOption>( in InitializeCollator() 161 …JSLocale::ResolveLocale(thread, availableLocales, requestedLocales, matcher, relevantExtensionKeys… in InitializeCollator() 186 if (!collationStr.empty() && JSLocale::IsWellCollation(icuLocale, collationStr)) { in InitializeCollator() 255 SensitivityOption sensitivity = JSLocale::GetOptionOfString<SensitivityOption>( in InitializeCollator() [all …]
|
D | js_displaynames.cpp | 87 …JSHandle<TaggedArray> availableLocales = JSLocale::ConstructLocaleList(thread, availableStringLoca… in GetAvailableLocales() 137 auto matcher = JSLocale::GetOptionOfString<LocaleMatcherOption>( in InitializeDisplayNames() 152 …JSLocale::ResolveLocale(thread, availableLocales, requestedLocales, matcher, relevantExtensionKeys… in InitializeDisplayNames() 158 auto StyOpt = JSLocale::GetOptionOfString<StyOption>(thread, optionsObject, property, in InitializeDisplayNames() 169 auto type = JSLocale::GetOptionOfString<TypednsOption>(thread, optionsObject, property, in InitializeDisplayNames() 186 auto fallback = JSLocale::GetOptionOfString<FallbackOption>(thread, optionsObject, property, in InitializeDisplayNames() 295 if (!JSLocale::IsWellFormedCurrencyCode(cCode)) { in CanonicalCodeForDisplayNames()
|
D | js_list_format.cpp | 82 …JSHandle<TaggedArray> availableLocales = JSLocale::ConstructLocaleList(thread, availableStringLoca… in GetAvailableLocales() 114 auto matcher = JSLocale::GetOptionOfString<LocaleMatcherOption>( in InitializeListFormat() 131 …JSLocale::ResolveLocale(thread, availableLocales, requestedLocales, matcher, relevantExtensionKeys… in InitializeListFormat() 142 auto type = JSLocale::GetOptionOfString<ListTypeOption>(thread, optionsObject, property, in InitializeListFormat() 154 auto style = JSLocale::GetOptionOfString<ListStyleOption>(thread, optionsObject, property, in InitializeListFormat() 309 …JSLocale::PutElement(thread, index, receiver, typeString, JSHandle<JSTaggedValue>::Cast(substring)… in FormatListToArray() 315 …JSLocale::PutElement(thread, index, receiver, typeString, JSHandle<JSTaggedValue>::Cast(substring)… in FormatListToArray()
|
D | js_date_time_format.cpp | 213 auto matcher = JSLocale::GetOptionOfString<LocaleMatcherOption>( in InitializeDateTimeFormat() 221 …JSLocale::GetOption(thread, dateTimeOptions, globalConst->GetHandledCalendarString(), OptionType::… in InitializeDateTimeFormat() 232 if (!JSLocale::IsNormativeCalendar(calendarStr)) { in InitializeDateTimeFormat() 239 …JSLocale::GetOption(thread, dateTimeOptions, globalConst->GetHandledNumberingSystemString(), Optio… in InitializeDateTimeFormat() 251 if (!JSLocale::IsWellNumberingSystem(nsStr)) { in InitializeDateTimeFormat() 258 …JSLocale::GetOption(thread, dateTimeOptions, globalConst->GetHandledHour12String(), OptionType::BO… in InitializeDateTimeFormat() 263 auto hourCycle = JSLocale::GetOptionOfString<HourCycleOption>( in InitializeDateTimeFormat() 282 …JSLocale::ResolveLocale(thread, availableLocales, requestedLocales, matcher, RELEVANT_EXTENSION_KE… in InitializeDateTimeFormat() 293 if (!calendar->IsUndefined() && JSLocale::IsWellCalendar(icuLocale, calendarStr)) { in InitializeDateTimeFormat() 296 if (!numberingSystem->IsUndefined() && JSLocale::IsWellNumberingSystem(nsStr)) { in InitializeDateTimeFormat() [all …]
|
D | js_plural_rules.cpp | 172 JSLocale::GetOptionOfString(thread, prOptions, globalConst->GetHandledLocaleMatcherString(), in InitializePluralRules() 180 …JSLocale::GetOptionOfString(thread, prOptions, property, { TypeOption::CARDINAL, TypeOption::ORDIN… in InitializePluralRules() 197 …JSLocale::ResolveLocale(thread, availableLocales, requestedLocales, matcher, relevantExtensionKeys… in InitializePluralRules() 247 …JSLocale::SetNumberFormatDigitOptions(thread, pluralRules, JSHandle<JSTaggedValue>::Cast(prOptions… in InitializePluralRules()
|
/arkcompiler/ets_runtime/ecmascript/intl/ |
D | locale_helper.cpp | 76 JSHandle<EcmaString> tag = JSLocale::ToString(thread, JSHandle<JSLocale>::Cast(locales)); in CanonicalizeLocaleList() 137 … JSHandle<EcmaString> kValueStr = JSLocale::ToString(thread, JSHandle<JSLocale>::Cast(kValue)); in CanonicalizeHelper()
|
/arkcompiler/ets_runtime/ecmascript/mem/ |
D | object_xray.h | 431 JSLocale::Cast(object)->VisitRangeSlot(visitor); in VisitObjectBody()
|