Home
last modified time | relevance | path

Searched refs:locales (Results 1 - 25 of 45) sorted by relevance

12

/arkcompiler/ets_runtime/ecmascript/builtins/
H A Dbuiltins_date.cpp222 // ecma 402 16.4.1 Date.prototype.toLocaleString ( [ locales [ , options ] ] )
247 JSHandle<JSTaggedValue> locales = GetCallArg(argv, 0); in ToLocaleString() local
249 [[maybe_unused]] bool cacheable = (locales->IsUndefined() || locales->IsString()) && options->IsUndefined(); in ToLocaleString()
252 auto simpleDateFormat = JSDateTimeFormat::GetCachedIcuSimpleDateFormat(thread, locales, in ToLocaleString()
264 // Let dateFormat be ? Construct(%DateTimeFormat%, « locales, options »). in ToLocaleString()
269 JSHandle<JSDateTimeFormat>::Cast(obj), locales, JSHandle<JSTaggedValue>::Cast(dateTimeOptions), type); in ToLocaleString()
272 auto simpleDateFormat = JSDateTimeFormat::GetCachedIcuSimpleDateFormat(thread, locales, in ToLocaleString()
290 locales, options, intl::GlobalFormatterType::DateFormatter, cacheable); in ToLocaleString()
303 // ecma 402 16.4.1 Date.prototype.toLocaleString ( [ locales [ , option
328 JSHandle<JSTaggedValue> locales = GetCallArg(argv, 0); ToLocaleDateString() local
409 JSHandle<JSTaggedValue> locales = GetCallArg(argv, 0); ToLocaleTimeString() local
[all...]
H A Dbuiltins_intl.cpp21 // 8.2.1 Intl.getCanonicalLocales ( locales )
28 // 1.Let ll be ? CanonicalizeLocaleList(locales). in GetCanonicalLocales()
29 JSHandle<JSTaggedValue> locales = GetCallArg(argv, 0); in GetCanonicalLocales() local
30 JSHandle<TaggedArray> elements = intl::LocaleHelper::CanonicalizeLocaleList(thread, locales); in GetCanonicalLocales()
H A Dbuiltins_bigint.cpp109 JSHandle<JSTaggedValue> locales = GetCallArg(argv, 0); in ToLocaleString() local
111 [[maybe_unused]] bool cacheable = (locales->IsUndefined() || locales->IsString()) && options->IsUndefined(); in ToLocaleString()
114 auto numberFormatter = JSNumberFormat::GetCachedIcuNumberFormatter(thread, locales); in ToLocaleString()
121 // 2. Let numberFormat be ? Construct(%NumberFormat%, « locales, options »). in ToLocaleString()
127 JSNumberFormat::InitializeNumberFormat(thread, numberFormat, locales, options, cacheable); in ToLocaleString()
130 auto numberFormatter = JSNumberFormat::GetCachedIcuNumberFormatter(thread, locales); in ToLocaleString()
147 locales, options, intl::GlobalFormatterType::NumberFormatter, cacheable); in ToLocaleString()
H A Dbuiltins_collator.cpp25 // 11.1.2 Intl.Collator ( [ locales [ , options ] ] )
52 // 6. Return ? InitializeCollator(collator, locales, options). in CollatorConstructor()
53 JSHandle<JSTaggedValue> locales = GetCallArg(argv, 0); in CollatorConstructor() local
55 JSHandle<JSCollator> result = JSCollator::InitializeCollator(thread, collator, locales, options); in CollatorConstructor()
60 // 11.2.2 Intl.Collator.supportedLocalesOf ( locales [ , options ] )
69 // 2. Let requestedLocales be ? CanonicalizeLocaleList(locales). in SupportedLocalesOf()
70 JSHandle<JSTaggedValue> locales = GetCallArg(argv, 0); in SupportedLocalesOf() local
71 JSHandle<TaggedArray> requestedLocales = intl::LocaleHelper::CanonicalizeLocaleList(thread, locales); in SupportedLocalesOf()
H A Dbuiltins_displaynames.cpp21 // 12.2.1 Intl.DisplayNames ( [ locales [ , options ] ] )
43 // 3. Perform ? InitializeDisplayNames(displayNames, locales, options). in DisplayNamesConstructor()
44 JSHandle<JSTaggedValue> locales = GetCallArg(argv, 0); in DisplayNamesConstructor() local
46 JSDisplayNames::InitializeDisplayNames(thread, displayNames, locales, options); in DisplayNamesConstructor()
51 // 12.3.2 Intl.DisplayNames.supportedLocalesOf ( locales [ , options ] )
61 // 2. Let requestedLocales be ? CanonicaliezLocaleList(locales). in SupportedLocalesOf()
62 JSHandle<JSTaggedValue> locales = GetCallArg(argv, 0); in SupportedLocalesOf() local
63 JSHandle<TaggedArray> requestedLocales = intl::LocaleHelper::CanonicalizeLocaleList(thread, locales); in SupportedLocalesOf()
H A Dbuiltins_plural_rules.cpp45 // 3. Return ? InitializePluralRules(pluralRules, locales, options). in PluralRulesConstructor()
46 JSHandle<JSTaggedValue> locales = GetCallArg(argv, 0); in PluralRulesConstructor() local
48 JSPluralRules::InitializePluralRules(thread, pluralRules, locales, options); in PluralRulesConstructor()
63 // 2. Let requestedLocales be ? CanonicalizeLocaleList(locales). in SupportedLocalesOf()
64 JSHandle<JSTaggedValue> locales = GetCallArg(argv, 0); in SupportedLocalesOf() local
65 JSHandle<TaggedArray> requestedLocales = intl::LocaleHelper::CanonicalizeLocaleList(thread, locales); in SupportedLocalesOf()
H A Dbuiltins_segmenter.cpp22 // 18.1.1 Intl.Segmenter ( [ locales [ , options ] ] )
44 // 3. Perform ? InitializeSegmenter(segmenter, locales, options). in SegmenterConstructor()
45 JSHandle<JSTaggedValue> locales = GetCallArg(argv, 0); in SegmenterConstructor() local
47 JSSegmenter::InitializeSegmenter(thread, segmenter, locales, options); in SegmenterConstructor()
52 // 18.2.2 Intl.Segmenter.supportedLocalesOf ( locales [ , options ] )
62 // 2. Let requestedLocales be ? CanonicalizeLocaleList(locales). in SupportedLocalesOf()
63 JSHandle<JSTaggedValue> locales = GetCallArg(argv, 0); in SupportedLocalesOf() local
64 JSHandle<TaggedArray> requestedLocales = intl::LocaleHelper::CanonicalizeLocaleList(thread, locales); in SupportedLocalesOf()
H A Dbuiltins_list_format.cpp46 // 3. Perform ? InitializeListFormat(listFormat, locales, options). in ListFormatConstructor()
47 JSHandle<JSTaggedValue> locales = GetCallArg(argv, 0); in ListFormatConstructor() local
49 listFormat = JSListFormat::InitializeListFormat(thread, listFormat, locales, options); in ListFormatConstructor()
54 // 13.3.2 Intl.ListFormat.supportedLocalesOf ( locales [ , options ] )
64 // 2. Let requestedLocales be ? CanonicalizeLocaleList(locales). in SupportedLocalesOf()
65 JSHandle<JSTaggedValue> locales = GetCallArg(argv, 0); in SupportedLocalesOf() local
66 JSHandle<TaggedArray> requestedLocales = intl::LocaleHelper::CanonicalizeLocaleList(thread, locales); in SupportedLocalesOf()
H A Dbuiltins_relative_time_format.cpp42 // 3. Perform ? InitializeRelativeTimeFormat(relativeTimeFormat, locales, options). in RelativeTimeFormatConstructor()
43 JSHandle<JSTaggedValue> locales = GetCallArg(argv, 0); in RelativeTimeFormatConstructor() local
45 JSRelativeTimeFormat::InitializeRelativeTimeFormat(thread, relativeTimeFormat, locales, options); in RelativeTimeFormatConstructor()
75 // 2. Let requestedLocales be ? CanonicalizeLocaleList(locales). in SupportedLocalesOf()
76 JSHandle<JSTaggedValue> locales = GetCallArg(argv, 0); in SupportedLocalesOf() local
77 JSHandle<TaggedArray> requestedLocales = intl::LocaleHelper::CanonicalizeLocaleList(thread, locales); in SupportedLocalesOf()
H A Dbuiltins_number_format.cpp22 // 13.2.1 Intl.NumberFormat ( [ locales [ , options ] ] )
48 // 3. Perform ? InitializeNumberFormat(numberFormat, locales, options). in NumberFormatConstructor()
49 JSHandle<JSTaggedValue> locales = GetCallArg(argv, 0); in NumberFormatConstructor() local
51 JSNumberFormat::InitializeNumberFormat(thread, numberFormat, locales, options); in NumberFormatConstructor()
78 // 13.3.2 Intl.NumberFormat.supportedLocalesOf ( locales [ , options ] )
87 // 2. Let requestedLocales be ? CanonicalizeLocaleList(locales). in SupportedLocalesOf()
88 JSHandle<JSTaggedValue> locales = GetCallArg(argv, 0); in SupportedLocalesOf() local
89 JSHandle<TaggedArray> requestedLocales = intl::LocaleHelper::CanonicalizeLocaleList(thread, locales); in SupportedLocalesOf()
H A Dbuiltins_number.cpp308 JSHandle<JSTaggedValue> locales = GetCallArg(argv, 0); in ToLocaleString() local
310 [[maybe_unused]] bool cacheable = (locales->IsUndefined() || locales->IsString()) && options->IsUndefined(); in ToLocaleString()
313 auto numberFormatter = JSNumberFormat::GetCachedIcuNumberFormatter(thread, locales); in ToLocaleString()
320 // 2. Let numberFormat be ? Construct(%NumberFormat%, « locales, options »). in ToLocaleString()
326 JSNumberFormat::InitializeNumberFormat(thread, numberFormat, locales, options, cacheable); in ToLocaleString()
329 auto numberFormatter = JSNumberFormat::GetCachedIcuNumberFormatter(thread, locales); in ToLocaleString()
346 locales, options, intl::GlobalFormatterType::NumberFormatter, cacheable); in ToLocaleString()
H A Dbuiltins_date_time_format.cpp26 // 13.2.1 Intl.DateTimeFormat ( [ locales [ , options ] ] )
51 // 3. Perform ? InitializeDateTimeFormat(dateTimeFormat, locales, options). in DateTimeFormatConstructor()
52 JSHandle<JSTaggedValue> locales = GetCallArg(argv, 0); in DateTimeFormatConstructor() local
55 JSDateTimeFormat::InitializeDateTimeFormat(thread, dateTimeFormat, locales, options); in DateTimeFormatConstructor()
82 // 13.3.2 Intl.DateTimeFormat.supportedLocalesOf ( locales [ , options ] )
91 // 2. Let requestedLocales be ? CanonicalizeLocaleList(locales). in SupportedLocalesOf()
92 JSHandle<JSTaggedValue> locales = GetCallArg(argv, 0); in SupportedLocalesOf() local
93 JSHandle<TaggedArray> requestedLocales = intl::LocaleHelper::CanonicalizeLocaleList(thread, locales); in SupportedLocalesOf()
/arkcompiler/ets_runtime/ecmascript/intl/
H A Dglobal_intl_helper.h73 std::unique_ptr<T> GetGlobalObject(JSThread *thread, const JSHandle<JSTaggedValue> &locales, in GetGlobalObject() argument
77 cacheEntryVector = LocalesToVector(thread, locales); in GetGlobalObject()
87 T *GetGlobalObject(JSThread *thread, const JSHandle<JSTaggedValue> &locales, in GetGlobalObject() argument
109 std::string cacheEntry = locales->IsUndefined() ? "" : in GetGlobalObject()
110 EcmaStringAccessor(locales.GetTaggedValue()).ToStdString(); in GetGlobalObject()
117 std::unique_ptr<T> tObject = GetGlobalObject<T>(thread, locales, options, types); in GetGlobalObject()
171 std::vector<std::string> LocalesToVector(JSThread *thread, const JSHandle<JSTaggedValue> &locales);
H A Dlocale_helper.cpp50 // 9.2.1 CanonicalizeLocaleList ( locales )
51 JSHandle<TaggedArray> LocaleHelper::CanonicalizeLocaleList(JSThread *thread, const JSHandle<JSTaggedValue> &locales) in CanonicalizeLocaleList() argument
54 // 1. If locales is undefined, then in CanonicalizeLocaleList()
56 if (locales->IsUndefined()) { in CanonicalizeLocaleList()
61 // 3. If Type(locales) is String or Type(locales) is Object and locales has an [[InitializedLocale]] internal slot, in CanonicalizeLocaleList()
63 // a. Let O be CreateArrayFromList(« locales »). in CanonicalizeLocaleList()
65 // a.Let O be ? ToObject(locales). in CanonicalizeLocaleList()
66 if (locales in CanonicalizeLocaleList()
[all...]
/arkcompiler/ets_runtime/ecmascript/
H A Djs_collator.h52 // All the available locales that are statically known to fulfill fast path conditions.
101 // 11.1.1 InitializeCollator ( collator, locales, options )
103 const JSHandle<JSTaggedValue> &locales,
108 static icu::Collator *GetCachedIcuCollator(JSThread *thread, const JSHandle<JSTaggedValue> &locales);
109 static icu::Collator *GetCachedIcuCollator(JSThread *thread, const JSTaggedValue &locales);
116 static CompareStringsOption CompareStringsOptionFor(JSThread *thread, JSHandle<JSTaggedValue> locales);
118 static CompareStringsOption CompareStringsOptionFor(JSThread *thread, JSHandle<JSTaggedValue> locales,
H A Djs_collator.cpp57 // All the available locales that are statically known to fulfill fast path conditions.
105 const JSHandle<JSTaggedValue> &locales, in InitializeCollator()
113 // 1. Let requestedLocales be ? CanonicalizeLocaleList(locales). in InitializeCollator()
114 JSHandle<TaggedArray> requestedLocales = intl::LocaleHelper::CanonicalizeLocaleList(thread, locales); in InitializeCollator()
320 // If the ignorePunctuation is not defined, which in "th" locale that is true but false on other locales. in InitializeCollator()
322 if (JSTaggedValue::Equal(thread, JSHandle<JSTaggedValue>::Cast(thKey), locales)) { in InitializeCollator()
336 locales->IsUndefined() ? "" : EcmaStringAccessor(locales.GetTaggedValue()).ToStdString(); in InitializeCollator()
347 icu::Collator *JSCollator::GetCachedIcuCollator(JSThread *thread, const JSTaggedValue &locales) in GetCachedIcuCollator() argument
349 std::string cacheEntry = locales in GetCachedIcuCollator()
103 InitializeCollator(JSThread *thread, const JSHandle<JSCollator> &collator, const JSHandle<JSTaggedValue> &locales, const JSHandle<JSTaggedValue> &options, bool forIcuCache, bool enableLocaleCache) InitializeCollator() argument
358 GetCachedIcuCollator(JSThread *thread, const JSHandle<JSTaggedValue> &locales) GetCachedIcuCollator() argument
501 CompareStringsOptionFor(JSThread* thread, JSHandle<JSTaggedValue> locales) CompareStringsOptionFor() argument
536 CompareStringsOptionFor(JSThread* thread, JSHandle<JSTaggedValue> locales, JSHandle<JSTaggedValue> options) CompareStringsOptionFor() argument
[all...]
H A Djs_plural_rules.cpp105 JSHandle<TaggedArray> locales = factory->NewTaggedArray(icuAvailableLocales.size()); in BuildLocaleSet() local
110 locales->Set(thread, index++, localeStr); in BuildLocaleSet()
112 return locales; in BuildLocaleSet()
115 bool GetNextLocale(icu::StringEnumeration *locales, std::string &localeStr, int32_t *len) in GetNextLocale() argument
119 locale = locales->next(len, status); in GetNextLocale()
131 std::unique_ptr<icu::StringEnumeration> locales(icu::PluralRules::getAvailableLocales(status)); in GetAvailableLocales()
138 while (GetNextLocale(locales.get(), localeStr, &len)) { in GetAvailableLocales()
148 // InitializePluralRules ( pluralRules, locales, options )
151 const JSHandle<JSTaggedValue> &locales, in InitializePluralRules()
158 // 1. Let requestedLocales be ? CanonicalizeLocaleList(locales) in InitializePluralRules()
149 InitializePluralRules(JSThread *thread, const JSHandle<JSPluralRules> &pluralRules, const JSHandle<JSTaggedValue> &locales, const JSHandle<JSTaggedValue> &options) InitializePluralRules() argument
[all...]
H A Djs_segmenter.cpp81 const JSHandle<JSTaggedValue> &locales, in InitializeSegmenter()
86 // 4. Let requestedLocales be ? CanonicalizeLocaleList(locales). in InitializeSegmenter()
87 JSHandle<TaggedArray> requestedLocales = intl::LocaleHelper::CanonicalizeLocaleList(thread, locales); in InitializeSegmenter()
79 InitializeSegmenter(JSThread *thread, const JSHandle<JSSegmenter> &segmenter, const JSHandle<JSTaggedValue> &locales, const JSHandle<JSTaggedValue> &options) InitializeSegmenter() argument
H A Djs_segmenter.h59 const JSHandle<JSTaggedValue> &locales,
H A Djs_list_format.h71 // 13. InitializeListFormat ( listformat, locales, options )
73 const JSHandle<JSTaggedValue> &locales,
H A Djs_displaynames.cpp134 // InitializeDisplayNames ( displayNames, locales, options )
137 const JSHandle<JSTaggedValue> &locales, in InitializeDisplayNames()
144 // 3. Let requestedLocales be ? CanonicalizeLocaleList(locales). in InitializeDisplayNames()
145 JSHandle<TaggedArray> requestedLocales = intl::LocaleHelper::CanonicalizeLocaleList(thread, locales); in InitializeDisplayNames()
363 icu::Locale locales = icuLocaldisplaynames->getLocale(); in CanonicalCodeForDisplayNames() local
365 icu::DateTimePatternGenerator::createInstance(locales, status)); in CanonicalCodeForDisplayNames()
135 InitializeDisplayNames(JSThread *thread, const JSHandle<JSDisplayNames> &displayNames, const JSHandle<JSTaggedValue> &locales, const JSHandle<JSTaggedValue> &options) InitializeDisplayNames() argument
/arkcompiler/ets_runtime/test/fuzztest/getformatfunction_fuzzer/
H A Dgetformatfunction_fuzzer.cpp45 JSHandle<JSTaggedValue> locales(factory->NewFromASCII("zh-Hans-CN")); in NumberGetFormatFunctionFuzzerTest()
47 JSNumberFormat::InitializeNumberFormat(thread, numberFormat, locales, undefinedOptions); in NumberGetFormatFunctionFuzzerTest()
/arkcompiler/ets_runtime/ecmascript/tests/
H A Djs_relative_time_format_test.cpp40 JSHandle<JSTaggedValue> locales(factory->NewFromASCII("en")); in HWTEST_F_L0()
42 JSRelativeTimeFormat::InitializeRelativeTimeFormat(thread, relativeTimeFormat, locales, undefinedOptions); in HWTEST_F_L0()
H A Djs_list_format_test.cpp84 JSHandle<JSLocale> locales = in CreateJSListFormatterTest() local
90 factory->NewJSIntlIcuData(locales, icuLocale, JSLocale::FreeIcuLocale); in CreateJSListFormatterTest()
92 JSHandle<JSTaggedValue>::Cast(locales), optionsVal); in CreateJSListFormatterTest()
129 JSHandle<JSLocale> locales = in HWTEST_F_L0() local
135 factory->NewJSIntlIcuData(locales, icuLocale, JSLocale::FreeIcuLocale); in HWTEST_F_L0()
137 JSHandle<JSTaggedValue>::Cast(locales), optionsVal); in HWTEST_F_L0()
H A Djs_date_time_format_first_test.cpp111 * @tc.desc: Initialize the time and date format through localization label locales and options.
121 // Create locales. in HWTEST_F_L0()
123 JSHandle<JSLocale> locales = in HWTEST_F_L0() local
126 factory->NewJSIntlIcuData(locales, icuLocale, JSLocale::FreeIcuLocale); in HWTEST_F_L0()
137 thread, dtf, JSHandle<JSTaggedValue>::Cast(locales), JSHandle<JSTaggedValue>::Cast(options)); in HWTEST_F_L0()

Completed in 15 milliseconds

12