Home
last modified time | relevance | path

Searched refs:JSLocale (Results 1 – 25 of 29) sorted by relevance

12

/arkcompiler/ets_runtime/ecmascript/tests/
Djs_locale_test.cpp112 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 …]
Djs_list_format_test.cpp117 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()
Djs_date_time_format_test.cpp206 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()
Dlocale_helper_test.cpp101 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()
Ddump_test.cpp666 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/
Dbuiltins_locale.cpp44 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 …]
Dbuiltins_relative_time_format.cpp75 …JSHandle<TaggedArray> availableLocales = JSLocale::ConstructLocaleList(thread, availableStringLoca… in SupportedLocalesOf()
84 …JSHandle<JSArray> result = JSLocale::SupportedLocales(thread, availableLocales, requestedLocales, … in SupportedLocalesOf()
Dbuiltins_plural_rules.cpp73 …JSHandle<JSArray> result = JSLocale::SupportedLocales(thread, availableLocales, requestedLocales, … in SupportedLocalesOf()
Dbuiltins_displaynames.cpp75 …JSHandle<JSArray> result = JSLocale::SupportedLocales(thread, availableLocales, requestedLocales, … in SupportedLocalesOf()
Dbuiltins_collator.cpp79 …JSHandle<JSArray> result = JSLocale::SupportedLocales(thread, availableLocales, requestedLocales, … in SupportedLocalesOf()
Dbuiltins_list_format.cpp76 …JSHandle<JSArray> result = JSLocale::SupportedLocales(thread, availableLocales, requestedLocales, … in SupportedLocalesOf()
Dbuiltins_number_format.cpp99 …JSHandle<JSArray> result = JSLocale::SupportedLocales(thread, availableLocales, requestedLocales, … in SupportedLocalesOf()
Dbuiltins_date_time_format.cpp97 …JSHandle<JSArray> result = JSLocale::SupportedLocales(thread, availableLocales, requestedLocales, … in SupportedLocalesOf()
/arkcompiler/ets_runtime/ecmascript/builtins/tests/
Dbuiltins_locale_test.cpp155 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/
Djs_locale.cpp44 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 …]
Djs_number_format.cpp268 auto style = JSLocale::GetOptionOfString<StyleOption>( in SetNumberFormatUnitOptions()
281JSLocale::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()
324JSLocale::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()
472JSLocale::GetOption(thread, optionsObject, property, OptionType::STRING, undefinedValue, undefined… in InitializeNumberFormat()
486 if (!JSLocale::IsNormativeNumberingSystem(numberingSystemStr)) { in InitializeNumberFormat()
[all …]
Djs_relative_time_format.cpp47JSLocale::GetOptionOfString(thread, rtfOptions, globalConst->GetHandledLocaleMatcherString(), in InitializeRelativeTimeFormat()
56JSLocale::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()
85JSLocale::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()
118JSLocale::GetOptionOfString(thread, rtfOptions, property, {NumericOption::ALWAYS, NumericOption::A… in InitializeRelativeTimeFormat()
160 std::string numberingSystem = JSLocale::GetNumberingSystem(icuLocale); in InitializeRelativeTimeFormat()
424JSLocale::PutElement(thread, index++, array, typeString, JSHandle<JSTaggedValue>::Cast(substring)); in FormatToArray()
[all …]
Djs_locale.h148 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 …]
Djs_collator.cpp52 …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()
121JSLocale::GetOption(thread, optionsObject, globalConst->GetHandledCollationString(), OptionType::S… in InitializeCollator()
129 if (!JSLocale::IsWellAlphaNumList(collationStr)) { in InitializeCollator()
137JSLocale::GetOptionOfBool(thread, optionsObject, globalConst->GetHandledNumericString(), false, &n… in InitializeCollator()
142 CaseFirstOption caseFirst = JSLocale::GetOptionOfString<CaseFirstOption>( in InitializeCollator()
161JSLocale::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 …]
Djs_displaynames.cpp87 …JSHandle<TaggedArray> availableLocales = JSLocale::ConstructLocaleList(thread, availableStringLoca… in GetAvailableLocales()
137 auto matcher = JSLocale::GetOptionOfString<LocaleMatcherOption>( in InitializeDisplayNames()
152JSLocale::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()
Djs_list_format.cpp82 …JSHandle<TaggedArray> availableLocales = JSLocale::ConstructLocaleList(thread, availableStringLoca… in GetAvailableLocales()
114 auto matcher = JSLocale::GetOptionOfString<LocaleMatcherOption>( in InitializeListFormat()
131JSLocale::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()
309JSLocale::PutElement(thread, index, receiver, typeString, JSHandle<JSTaggedValue>::Cast(substring)… in FormatListToArray()
315JSLocale::PutElement(thread, index, receiver, typeString, JSHandle<JSTaggedValue>::Cast(substring)… in FormatListToArray()
Djs_date_time_format.cpp213 auto matcher = JSLocale::GetOptionOfString<LocaleMatcherOption>( in InitializeDateTimeFormat()
221JSLocale::GetOption(thread, dateTimeOptions, globalConst->GetHandledCalendarString(), OptionType::… in InitializeDateTimeFormat()
232 if (!JSLocale::IsNormativeCalendar(calendarStr)) { in InitializeDateTimeFormat()
239JSLocale::GetOption(thread, dateTimeOptions, globalConst->GetHandledNumberingSystemString(), Optio… in InitializeDateTimeFormat()
251 if (!JSLocale::IsWellNumberingSystem(nsStr)) { in InitializeDateTimeFormat()
258JSLocale::GetOption(thread, dateTimeOptions, globalConst->GetHandledHour12String(), OptionType::BO… in InitializeDateTimeFormat()
263 auto hourCycle = JSLocale::GetOptionOfString<HourCycleOption>( in InitializeDateTimeFormat()
282JSLocale::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 …]
Djs_plural_rules.cpp172 JSLocale::GetOptionOfString(thread, prOptions, globalConst->GetHandledLocaleMatcherString(), in InitializePluralRules()
180JSLocale::GetOptionOfString(thread, prOptions, property, { TypeOption::CARDINAL, TypeOption::ORDIN… in InitializePluralRules()
197JSLocale::ResolveLocale(thread, availableLocales, requestedLocales, matcher, relevantExtensionKeys… in InitializePluralRules()
247JSLocale::SetNumberFormatDigitOptions(thread, pluralRules, JSHandle<JSTaggedValue>::Cast(prOptions… in InitializePluralRules()
/arkcompiler/ets_runtime/ecmascript/intl/
Dlocale_helper.cpp76 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/
Dobject_xray.h431 JSLocale::Cast(object)->VisitRangeSlot(visitor); in VisitObjectBody()

12