Name Description Size Coverage
Collator.cpp Intl.Collator implementation. 28964 89 %
Collator.h Returns a new instance of the standard built-in Collator constructor. 4101 96 %
collator_glue 97 %
CommonFunctions.cpp Operations used to implement multiple Intl.* classes. 4762 73 %
CommonFunctions.h ChainDateTimeFormat ( dateTimeFormat, newTarget, this ) ChainNumberFormat ( numberFormat, newTarget, this ) 2493 0 %
CurrencyDataGenerated.h Mapping from currency codes to the number of decimal digits used for them. Default is 2 digits. Spec: ISO 4217 Currency and Funds Code List. http://www.currency-iso.org/en/home/tables/table-a1.html 4411 -
DateTimeFormat.cpp Intl.DateTimeFormat implementation. 114855 90 %
DateTimeFormat.h 7552 97 %
DisplayNames.cpp Intl.DisplayNames implementation. 32011 83 %
DisplayNames.h builtin_intl_DisplayNames_h 2783 95 %
DurationFormat.cpp Intl.DurationFormat implementation. 67294 88 %
DurationFormat.h `toLocaleString` implementation for Temporal.Duration objects. 4830 97 %
FormatBuffer.h A buffer for formatting unified intl data. 4316 97 %
GlobalIntlData.cpp 10041 91 %
GlobalIntlData.h Cached per-global Intl data. In contrast to SharedIntlData, which is a per-runtime shared Intl cache, this cache is per-global. 6117 100 %
IcuMemoryUsage.java Java program to estimate the memory usage of ICU objects (bug 1585536). It computes for each Intl constructor the amount of allocated memory. We're currently using the maximum memory ("max" in the output) to estimate the memory consumption of ICU objects. Insert before {@code JS_InitWithFailureDiagnostic} in "js.cpp": <pre> <code> JS_SetICUMemoryFunctions( [](const void*, size_t size) { void* ptr = malloc(size); if (ptr) { printf(" alloc: %p -> %zu\n", ptr, size); } return ptr; }, [](const void*, void* p, size_t size) { void* ptr = realloc(p, size); if (p) { printf(" realloc: %p -> %p -> %zu\n", p, ptr, size); } else { printf(" alloc: %p -> %zu\n", ptr, size); } return ptr; }, [](const void*, void* p) { if (p) { printf(" free: %p\n", p); } free(p); }); </code> </pre> Run this script with: {@code java IcuMemoryUsage.java $MOZ_JS_SHELL}. 9992 -
IntlMathematicalValue.cpp 15.5.16 ToIntlMathematicalValue ( value ) ES2024 Intl draft rev 74ca7099f103d143431b2ea422ae640c6f43e3e6 6548 94 %
IntlMathematicalValue.h An Intl mathematical value is either a numeric value or a string which can be parsed as `StringNumericLiteral`. 4387 97 %
IntlObject.cpp Implementation of the Intl object and its non-constructor properties. 18433 81 %
IntlObject.h builtin_intl_IntlObject_h 418 -
LanguageTag.cpp 8210 84 %
LanguageTag.h Structured representation of Unicode locale IDs used with Intl functions. 3400 100 %
ListFormat.cpp 20750 86 %
ListFormat.h builtin_intl_ListFormat_h 2335 93 %
Locale.cpp Intl.Locale implementation. 43245 89 %
Locale.h Returns the complete language tag, including any extensions and privateuse subtags. 1277 100 %
LocaleNegotiation.cpp 9.2.2 BestAvailableLocale ( availableLocales, locale ) Compares a BCP 47 language tag against the locales in availableLocales and returns the best available match. Uses the fallback mechanism of RFC 4647, section 3.4. Spec: ECMAScript Internationalization API Specification, 9.2.2. Spec: RFC 4647, section 3.4. 39585 89 %
LocaleNegotiation.h ca 8192 100 %
make_intl_data.py Usage: make_intl_data.py langtags [cldr_common.zip] make_intl_data.py tzdata make_intl_data.py currency make_intl_data.py units make_intl_data.py numbering Target "langtags": This script extracts information about 1) mappings between deprecated and current Unicode BCP 47 locale identifiers, and 2) deprecated and current BCP 47 Unicode extension value from CLDR, and converts it to C++ mapping code in intl/components/LocaleGenerated.cpp. The code is used in intl/components/Locale.cpp. Target "tzdata": This script computes which time zone informations are not up-to-date in ICU and provides the necessary mappings to workaround this problem. https://ssl.icu-project.org/trac/ticket/12044 Target "currency": Generates the mapping from currency codes to decimal digits used for them. Target "units": Generate source and test files using the list of so-called "sanctioned unit identifiers" and verifies that the ICU data filter includes these units. Target "numbering": Generate source and test files using the list of numbering systems with simple digit mappings and verifies that it's in sync with ICU/CLDR. 137224 -
MeasureUnitGenerated.h The list of currently supported simple unit identifiers. The list must be kept in alphabetical order. 1146 -
moz.build 1047 -
NumberFormat.cpp Intl.NumberFormat implementation. 86699 89 %
NumberFormat.h Returns a new instance of the standard built-in NumberFormat constructor. 5745 96 %
NumberFormatOptions.h 15372 100 %
NumberingSystems.yaml 1091 -
NumberingSystemsGenerated.h The list of numbering systems with simple digit mappings. 1356 -
Packed.h Return true if the bit representation fits into JS::PrivateUint32Value. 15949 100 %
ParameterNegotiation.cpp GetOption ( options, property, type, values, default ) 13307 92 %
ParameterNegotiation.h Pair representing options and their corresponding names. 10235 100 %
PluralRules.cpp Intl.PluralRules implementation. 22301 85 %
PluralRules.h builtin_intl_PluralRules_h 2509 93 %
RelativeTimeFormat.cpp Intl.RelativeTimeFormat implementation. 22749 89 %
RelativeTimeFormat.h builtin_intl_RelativeTimeFormat_h 3082 95 %
SanctionedSimpleUnitIdentifiers.yaml 936 -
Segmenter.cpp Intl.Segmenter implementation. 36128 91 %
Segmenter.h 11130 94 %
Segmenter.js CreateSegmentDataObject ( segmenter, string, startIndex, endIndex ) 4142 -
SharedIntlData.cpp Runtime-wide Intl data shared across compartments. 20949 85 %
SharedIntlData.h This deleter class exists so that mozilla::intl::DateTimePatternGenerator can be a forward declaration, but still be used inside of a UniquePtr. 12288 96 %
StringAsciiChars.h String view of an ASCII-only string. This holds a reference to a JSLinearString and can produce a string view into that string. If the string is represented by Latin1 characters, the span is returned directly. If the string is represented by UTF-16 characters, it copies the char16_t characters into a char array, and then returns a span based on the copy. This allows us to avoid copying for the common use case that the ASCII characters are represented in Latin1. 2033 94 %
TimeZoneDataGenerated.h 5535 -
TimeZoneMapping.yaml 2676 -
UsingEnum.h 872 -