Skip to content

Commit

Permalink
Backed out 11 changesets (bug 1763783) for causing spidermonkey busta…
Browse files Browse the repository at this point in the history
…ges. CLOSED TREE

Backed out changeset 9f69cfa948a3 (bug 1763783)
Backed out changeset 3ae303350839 (bug 1763783)
Backed out changeset 27c4895e1b2f (bug 1763783)
Backed out changeset ff5f35f83b2a (bug 1763783)
Backed out changeset 1ef8335cceca (bug 1763783)
Backed out changeset 10c435662b3c (bug 1763783)
Backed out changeset 8308dfec4d4f (bug 1763783)
Backed out changeset cb7ea7f5d5c7 (bug 1763783)
Backed out changeset b17cfc9dda12 (bug 1763783)
Backed out changeset 4d8b84842e34 (bug 1763783)
Backed out changeset 8c45437d1136 (bug 1763783)
  • Loading branch information
CosminSabou committed Apr 9, 2022
1 parent 072e163 commit 3aee005
Show file tree
Hide file tree
Showing 601 changed files with 5,643 additions and 74,011 deletions.
2 changes: 1 addition & 1 deletion CLOBBER
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@
# changes to stick? As of bug 928195, this shouldn't be necessary! Please
# don't change CLOBBER for WebIDL changes any more.

Bug 1763783 - Update to ICU 71 requires clobber
Merge day clobber 2022-04-04
Binary file not shown.
1 change: 0 additions & 1 deletion config/external/icu/i18n/sources.mozbuild
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,6 @@ EXPORTS.unicode += [
'/intl/icu/source/i18n/unicode/ulocdata.h',
'/intl/icu/source/i18n/unicode/umsg.h',
'/intl/icu/source/i18n/unicode/unirepl.h',
'/intl/icu/source/i18n/unicode/unounclass.h',
'/intl/icu/source/i18n/unicode/unum.h',
'/intl/icu/source/i18n/unicode/unumberformatter.h',
'/intl/icu/source/i18n/unicode/unumberrangeformatter.h',
Expand Down
7 changes: 6 additions & 1 deletion intl/components/src/DateTimeFormat.h
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,8 @@ class DateTimeFormat final {
* plan to remove it.
*/
template <typename B>
ICUResult GetOriginalSkeleton(B& aBuffer) {
ICUResult GetOriginalSkeleton(B& aBuffer,
Maybe<HourCycle> aHourCycle = Nothing()) {
static_assert(std::is_same_v<typename B::CharType, char16_t>);
if (mOriginalSkeleton.length() == 0) {
// Generate a skeleton from the resolved pattern, there was no originally
Expand All @@ -435,6 +436,10 @@ class DateTimeFormat final {
if (!FillBuffer(mOriginalSkeleton, aBuffer)) {
return Err(ICUError::OutOfMemory);
}
if (aHourCycle) {
DateTimeFormat::ReplaceHourSymbol(Span(aBuffer.data(), aBuffer.length()),
*aHourCycle);
}
return Ok();
}
/**
Expand Down
53 changes: 22 additions & 31 deletions intl/components/src/LocaleGenerated.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Generated by make_intl_data.py. DO NOT EDIT.
// Version: CLDR-41
// URL: https://unicode.org/Public/cldr/41/core.zip
// Version: CLDR-40
// URL: https://unicode.org/Public/cldr/40/core.zip

#include "mozilla/Assertions.h"
#include "mozilla/Span.h"
Expand Down Expand Up @@ -99,8 +99,8 @@ static bool IsCanonicallyCasedTransformType(mozilla::Span<const char> type) {
#endif

// Mappings from language subtags to preferred values.
// Derived from CLDR Supplemental Data, version 41.
// https://unicode.org/Public/cldr/41/core.zip
// Derived from CLDR Supplemental Data, version 40.
// https://unicode.org/Public/cldr/40/core.zip
bool mozilla::intl::Locale::LanguageMapping(LanguageSubtag& language) {
MOZ_ASSERT(IsStructurallyValidLanguageTag(language.Span()));
MOZ_ASSERT(IsCanonicallyCasedLanguageTag(language.Span()));
Expand Down Expand Up @@ -219,8 +219,8 @@ bool mozilla::intl::Locale::LanguageMapping(LanguageSubtag& language) {
}

// Language subtags with complex mappings.
// Derived from CLDR Supplemental Data, version 41.
// https://unicode.org/Public/cldr/41/core.zip
// Derived from CLDR Supplemental Data, version 40.
// https://unicode.org/Public/cldr/40/core.zip
bool mozilla::intl::Locale::ComplexLanguageMapping(const LanguageSubtag& language) {
MOZ_ASSERT(IsStructurallyValidLanguageTag(language.Span()));
MOZ_ASSERT(IsCanonicallyCasedLanguageTag(language.Span()));
Expand All @@ -241,8 +241,8 @@ bool mozilla::intl::Locale::ComplexLanguageMapping(const LanguageSubtag& languag
}

// Mappings from script subtags to preferred values.
// Derived from CLDR Supplemental Data, version 41.
// https://unicode.org/Public/cldr/41/core.zip
// Derived from CLDR Supplemental Data, version 40.
// https://unicode.org/Public/cldr/40/core.zip
bool mozilla::intl::Locale::ScriptMapping(ScriptSubtag& script) {
MOZ_ASSERT(IsStructurallyValidScriptTag(script.Span()));
MOZ_ASSERT(IsCanonicallyCasedScriptTag(script.Span()));
Expand All @@ -257,8 +257,8 @@ bool mozilla::intl::Locale::ScriptMapping(ScriptSubtag& script) {
}

// Mappings from region subtags to preferred values.
// Derived from CLDR Supplemental Data, version 41.
// https://unicode.org/Public/cldr/41/core.zip
// Derived from CLDR Supplemental Data, version 40.
// https://unicode.org/Public/cldr/40/core.zip
bool mozilla::intl::Locale::RegionMapping(RegionSubtag& region) {
MOZ_ASSERT(IsStructurallyValidRegionTag(region.Span()));
MOZ_ASSERT(IsCanonicallyCasedRegionTag(region.Span()));
Expand Down Expand Up @@ -357,8 +357,8 @@ bool mozilla::intl::Locale::RegionMapping(RegionSubtag& region) {
}

// Region subtags with complex mappings.
// Derived from CLDR Supplemental Data, version 41.
// https://unicode.org/Public/cldr/41/core.zip
// Derived from CLDR Supplemental Data, version 40.
// https://unicode.org/Public/cldr/40/core.zip
bool mozilla::intl::Locale::ComplexRegionMapping(const RegionSubtag& region) {
MOZ_ASSERT(IsStructurallyValidRegionTag(region.Span()));
MOZ_ASSERT(IsCanonicallyCasedRegionTag(region.Span()));
Expand All @@ -380,8 +380,8 @@ bool mozilla::intl::Locale::ComplexRegionMapping(const RegionSubtag& region) {
}

// Language subtags with complex mappings.
// Derived from CLDR Supplemental Data, version 41.
// https://unicode.org/Public/cldr/41/core.zip
// Derived from CLDR Supplemental Data, version 40.
// https://unicode.org/Public/cldr/40/core.zip
void mozilla::intl::Locale::PerformComplexLanguageMappings() {
MOZ_ASSERT(IsStructurallyValidLanguageTag(Language().Span()));
MOZ_ASSERT(IsCanonicallyCasedLanguageTag(Language().Span()));
Expand Down Expand Up @@ -416,8 +416,8 @@ void mozilla::intl::Locale::PerformComplexLanguageMappings() {
}

// Region subtags with complex mappings.
// Derived from CLDR Supplemental Data, version 41.
// https://unicode.org/Public/cldr/41/core.zip
// Derived from CLDR Supplemental Data, version 40.
// https://unicode.org/Public/cldr/40/core.zip
void mozilla::intl::Locale::PerformComplexRegionMappings() {
MOZ_ASSERT(IsStructurallyValidLanguageTag(Language().Span()));
MOZ_ASSERT(IsCanonicallyCasedLanguageTag(Language().Span()));
Expand Down Expand Up @@ -643,8 +643,8 @@ static bool IsLessThan(const T& a, const U& b) {
}

// Mappings from variant subtags to preferred values.
// Derived from CLDR Supplemental Data, version 41.
// https://unicode.org/Public/cldr/41/core.zip
// Derived from CLDR Supplemental Data, version 40.
// https://unicode.org/Public/cldr/40/core.zip
bool mozilla::intl::Locale::PerformVariantMappings() {
// The variant subtags need to be sorted for binary search.
MOZ_ASSERT(std::is_sorted(mVariants.begin(), mVariants.end(),
Expand Down Expand Up @@ -707,8 +707,8 @@ bool mozilla::intl::Locale::PerformVariantMappings() {
}

// Canonicalize legacy locale identifiers.
// Derived from CLDR Supplemental Data, version 41.
// https://unicode.org/Public/cldr/41/core.zip
// Derived from CLDR Supplemental Data, version 40.
// https://unicode.org/Public/cldr/40/core.zip
bool mozilla::intl::Locale::UpdateLegacyMappings() {
// We're mapping legacy tags to non-legacy form here.
// Other tags remain unchanged.
Expand Down Expand Up @@ -865,8 +865,8 @@ bool mozilla::intl::Locale::UpdateLegacyMappings() {
}

// Mappings from legacy sign languages.
// Derived from CLDR Supplemental Data, version 41.
// https://unicode.org/Public/cldr/41/core.zip
// Derived from CLDR Supplemental Data, version 40.
// https://unicode.org/Public/cldr/40/core.zip
bool mozilla::intl::Locale::SignLanguageMapping(LanguageSubtag& language,
const RegionSubtag& region) {
MOZ_ASSERT(language.EqualTo("sgn"));
Expand Down Expand Up @@ -1112,18 +1112,9 @@ const char* mozilla::intl::Locale::ReplaceTransformExtensionType(
}
}
else if (IsTransformKey(key, "m0")) {
if (IsTransformType(type, "beta-metsehaf")) {
return "betamets";
}
if (IsTransformType(type, "ies-jes")) {
return "iesjes";
}
if (IsTransformType(type, "names")) {
return "prprname";
}
if (IsTransformType(type, "tekie-alibekit")) {
return "tekieali";
}
}
return nullptr;
}
2 changes: 1 addition & 1 deletion intl/components/src/NumberFormatFields.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ Maybe<NumberPartType> GetPartTypeForNumberField(UNumberFormatFields fieldName,
return Some(NumberPartType::Unit);
case UNUM_COMPACT_FIELD:
return Some(NumberPartType::Compact);
#ifndef U_HIDE_DRAFT_API
#if !MOZ_SYSTEM_ICU
case UNUM_APPROXIMATELY_SIGN_FIELD:
return Some(NumberPartType::ApproximatelySign);
#endif
Expand Down
5 changes: 5 additions & 0 deletions intl/components/src/TimeZone.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,13 @@ Result<int32_t, ICUError> TimeZone::GetUTCOffsetMs(int64_t aLocalMilliseconds) {
// time starts or the time zone offset is increased due to a time zone rule
// change), t_local must be interpreted using the time zone offset before the
// transition.
#ifndef U_HIDE_DRAFT_API
constexpr UTimeZoneLocalOption skippedTime = UCAL_TZ_LOCAL_FORMER;
constexpr UTimeZoneLocalOption repeatedTime = UCAL_TZ_LOCAL_FORMER;
#else
constexpr UTimeZoneLocalOption skippedTime = UTimeZoneLocalOption(0x4);
constexpr UTimeZoneLocalOption repeatedTime = UTimeZoneLocalOption(0x4);
#endif

UDate date = UDate(aLocalMilliseconds);

Expand Down
56 changes: 56 additions & 0 deletions intl/icu-patches/bug-1738422-approximately-sign.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Add a new UNumberFormatFields constant for the approximately sign.
#
# https://unicode-org.atlassian.net/browse/ICU-21765


diff --git a/intl/icu/source/i18n/number_affixutils.cpp b/intl/icu/source/i18n/number_affixutils.cpp
--- a/intl/icu/source/i18n/number_affixutils.cpp
+++ b/intl/icu/source/i18n/number_affixutils.cpp
@@ -131,17 +131,17 @@ UnicodeString AffixUtils::escape(const U
Field AffixUtils::getFieldForType(AffixPatternType type) {
switch (type) {
case TYPE_MINUS_SIGN:
return {UFIELD_CATEGORY_NUMBER, UNUM_SIGN_FIELD};
case TYPE_PLUS_SIGN:
return {UFIELD_CATEGORY_NUMBER, UNUM_SIGN_FIELD};
case TYPE_APPROXIMATELY_SIGN:
// TODO: Introduce a new field for the approximately sign?
- return {UFIELD_CATEGORY_NUMBER, UNUM_SIGN_FIELD};
+ return {UFIELD_CATEGORY_NUMBER, UNUM_APPROXIMATELY_SIGN_FIELD};
case TYPE_PERCENT:
return {UFIELD_CATEGORY_NUMBER, UNUM_PERCENT_FIELD};
case TYPE_PERMILLE:
return {UFIELD_CATEGORY_NUMBER, UNUM_PERMILL_FIELD};
case TYPE_CURRENCY_SINGLE:
return {UFIELD_CATEGORY_NUMBER, UNUM_CURRENCY_FIELD};
case TYPE_CURRENCY_DOUBLE:
return {UFIELD_CATEGORY_NUMBER, UNUM_CURRENCY_FIELD};
diff --git a/intl/icu/source/i18n/unicode/unum.h b/intl/icu/source/i18n/unicode/unum.h
--- a/intl/icu/source/i18n/unicode/unum.h
+++ b/intl/icu/source/i18n/unicode/unum.h
@@ -397,22 +397,24 @@ typedef enum UNumberFormatFields {
UNUM_PERMILL_FIELD,
/** @stable ICU 49 */
UNUM_SIGN_FIELD,
/** @stable ICU 64 */
UNUM_MEASURE_UNIT_FIELD,
/** @stable ICU 64 */
UNUM_COMPACT_FIELD,

+ UNUM_APPROXIMATELY_SIGN_FIELD,
+
#ifndef U_HIDE_DEPRECATED_API
/**
* One more than the highest normal UNumberFormatFields value.
* @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420.
*/
- UNUM_FIELD_COUNT = UNUM_SIGN_FIELD + 3
+ UNUM_FIELD_COUNT = UNUM_SIGN_FIELD + 4
#endif /* U_HIDE_DEPRECATED_API */
} UNumberFormatFields;


/**
* Selectors with special numeric values to use locale default minimum grouping
* digits for the DecimalFormat/UNumberFormat setMinimumGroupingDigits method.
* Do not use these constants with the [U]NumberFormatter API.
8 changes: 4 additions & 4 deletions intl/icu/GIT-INFO
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
commit c205e7ee49a7086a28b9c275fcfdac9ca3dc815d
Author: yumaoka <[email protected]>
Date: Wed Mar 30 14:47:46 2022 -0400
commit a56dde820dc35665a66f2e9ee8ba58e75049b668
Author: Shane F. Carr <[email protected]>
Date: Wed Oct 27 15:02:46 2021 -0700

ICU-21971 Added a new numeric currecny code SLE/695 for Sierra Leone Leone.
ICU-21579 Fix warnings in number formatting code
File renamed without changes.
1 change: 0 additions & 1 deletion intl/icu/source/common/brkeng.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ UnhandledEngine::findBreaks( UText *text,
int32_t /* startPos */,
int32_t endPos,
UVector32 &/*foundBreaks*/,
UBool /* isPhraseBreaking */,
UErrorCode &status) const {
if (U_FAILURE(status)) return 0;
UChar32 c = utext_current32(text);
Expand Down
2 changes: 0 additions & 2 deletions intl/icu/source/common/brkeng.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ class LanguageBreakEngine : public UMemory {
int32_t startPos,
int32_t endPos,
UVector32 &foundBreaks,
UBool isPhraseBreaking,
UErrorCode &status) const = 0;

};
Expand Down Expand Up @@ -195,7 +194,6 @@ class UnhandledEngine : public LanguageBreakEngine {
int32_t startPos,
int32_t endPos,
UVector32 &foundBreaks,
UBool isPhraseBreaking,
UErrorCode &status) const override;

/**
Expand Down
31 changes: 10 additions & 21 deletions intl/icu/source/common/brkiter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
#include "unicode/ures.h"
#include "unicode/ustring.h"
#include "unicode/filteredbrk.h"
#include "bytesinkutil.h"
#include "ucln_cmn.h"
#include "cstring.h"
#include "umutex.h"
Expand Down Expand Up @@ -116,7 +115,7 @@ BreakIterator::buildInstance(const Locale& loc, const char *type, UErrorCode &st
}

// Create a RuleBasedBreakIterator
result = new RuleBasedBreakIterator(file, uprv_strstr(type, "phrase") != NULL, status);
result = new RuleBasedBreakIterator(file, status);

// If there is a result, set the valid locale and actual locale, and the kind
if (U_SUCCESS(status) && result != NULL) {
Expand Down Expand Up @@ -409,6 +408,7 @@ BreakIterator::makeInstance(const Locale& loc, int32_t kind, UErrorCode& status)
if (U_FAILURE(status)) {
return NULL;
}
char lbType[kKeyValueLenMax];

BreakIterator *result = NULL;
switch (kind) {
Expand All @@ -428,29 +428,18 @@ BreakIterator::makeInstance(const Locale& loc, int32_t kind, UErrorCode& status)
break;
case UBRK_LINE:
{
char lb_lw[kKeyValueLenMax];
UTRACE_ENTRY(UTRACE_UBRK_CREATE_LINE);
uprv_strcpy(lb_lw, "line");
uprv_strcpy(lbType, "line");
char lbKeyValue[kKeyValueLenMax] = {0};
UErrorCode kvStatus = U_ZERO_ERROR;
CharString value;
CharStringByteSink valueSink(&value);
loc.getKeywordValue("lb", valueSink, kvStatus);
if (U_SUCCESS(kvStatus) && (value == "strict" || value == "normal" || value == "loose")) {
uprv_strcat(lb_lw, "_");
uprv_strcat(lb_lw, value.data());
int32_t kLen = loc.getKeywordValue("lb", lbKeyValue, kKeyValueLenMax, kvStatus);
if (U_SUCCESS(kvStatus) && kLen > 0 && (uprv_strcmp(lbKeyValue,"strict")==0 || uprv_strcmp(lbKeyValue,"normal")==0 || uprv_strcmp(lbKeyValue,"loose")==0)) {
uprv_strcat(lbType, "_");
uprv_strcat(lbType, lbKeyValue);
}
// lw=phrase is only supported in Japanese.
if (uprv_strcmp(loc.getLanguage(), "ja") == 0) {
value.clear();
loc.getKeywordValue("lw", valueSink, kvStatus);
if (U_SUCCESS(kvStatus) && value == "phrase") {
uprv_strcat(lb_lw, "_");
uprv_strcat(lb_lw, value.data());
}
}
result = BreakIterator::buildInstance(loc, lb_lw, status);
result = BreakIterator::buildInstance(loc, lbType, status);

UTRACE_DATA1(UTRACE_INFO, "lb_lw=%s", lb_lw);
UTRACE_DATA1(UTRACE_INFO, "lb=%s", lbKeyValue);
UTRACE_EXIT_STATUS(status);
}
break;
Expand Down
4 changes: 2 additions & 2 deletions intl/icu/source/common/common.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
</ClCompile>
<Link>
<OutputFile>..\..\$(IcuBinOutputDir)\icuuc71d.dll</OutputFile>
<OutputFile>..\..\$(IcuBinOutputDir)\icuuc70d.dll</OutputFile>
<ProgramDatabaseFile>.\..\..\$(IcuLibOutputDir)\icuucd.pdb</ProgramDatabaseFile>
<ImportLibrary>..\..\$(IcuLibOutputDir)\icuucd.lib</ImportLibrary>
</Link>
Expand All @@ -70,7 +70,7 @@
<FunctionLevelLinking>true</FunctionLevelLinking>
</ClCompile>
<Link>
<OutputFile>..\..\$(IcuBinOutputDir)\icuuc71.dll</OutputFile>
<OutputFile>..\..\$(IcuBinOutputDir)\icuuc70.dll</OutputFile>
<ProgramDatabaseFile>.\..\..\$(IcuLibOutputDir)\icuuc.pdb</ProgramDatabaseFile>
<ImportLibrary>..\..\$(IcuLibOutputDir)\icuuc.lib</ImportLibrary>
</Link>
Expand Down
4 changes: 2 additions & 2 deletions intl/icu/source/common/common_uwp.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
<Link>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<AdditionalDependencies>vccorlib.lib;msvcrt.lib;vcruntime.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>..\..\$(IcuBinOutputDir)\icuuc71.dll</OutputFile>
<OutputFile>..\..\$(IcuBinOutputDir)\icuuc70.dll</OutputFile>
<ProgramDatabaseFile>.\..\..\$(IcuLibOutputDir)\icuuc.pdb</ProgramDatabaseFile>
<ImportLibrary>..\..\$(IcuLibOutputDir)\icuuc.lib</ImportLibrary>
</Link>
Expand All @@ -148,7 +148,7 @@
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>vccorlibd.lib;msvcrtd.lib;vcruntimed.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>..\..\$(IcuBinOutputDir)\icuuc71d.dll</OutputFile>
<OutputFile>..\..\$(IcuBinOutputDir)\icuuc70d.dll</OutputFile>
<ProgramDatabaseFile>.\..\..\$(IcuLibOutputDir)\icuucd.pdb</ProgramDatabaseFile>
<ImportLibrary>..\..\$(IcuLibOutputDir)\icuucd.lib</ImportLibrary>
</Link>
Expand Down
Loading

0 comments on commit 3aee005

Please sign in to comment.