Skip to content

Commit 58f61db

Browse files
srl295targos
authored andcommitted
deps: ICU 61.1 bump
- Update to released ICU 61.1, including: - CLDR 33 (many new languages and data improvements) - Many small API additions, improvements, and bug fixes - note: 'icu::' namespace is no longer used by default (Necessated #18667 ) PR-URL: #19621 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 1aaad92 commit 58f61db

File tree

180 files changed

+8959
-2011
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

180 files changed

+8959
-2011
lines changed

LICENSE

+31-2
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,8 @@ The externally maintained libraries used by Node.js are:
9999
"""
100100
COPYRIGHT AND PERMISSION NOTICE (ICU 58 and later)
101101

102-
Copyright © 1991-2017 Unicode, Inc. All rights reserved.
103-
Distributed under the Terms of Use in http://www.unicode.org/copyright.html
102+
Copyright © 1991-2018 Unicode, Inc. All rights reserved.
103+
Distributed under the Terms of Use in http://www.unicode.org/copyright.html.
104104

105105
Permission is hereby granted, free of charge, to any person obtaining
106106
a copy of the Unicode data files and any associated documentation
@@ -482,6 +482,35 @@ The externally maintained libraries used by Node.js are:
482482
# by ICANN or the IETF Trust on the database or the code. Any person
483483
# making a contribution to the database or code waives all rights to
484484
# future claims in that contribution or in the TZ Database.
485+
486+
6. Google double-conversion
487+
488+
Copyright 2006-2011, the V8 project authors. All rights reserved.
489+
Redistribution and use in source and binary forms, with or without
490+
modification, are permitted provided that the following conditions are
491+
met:
492+
493+
* Redistributions of source code must retain the above copyright
494+
notice, this list of conditions and the following disclaimer.
495+
* Redistributions in binary form must reproduce the above
496+
copyright notice, this list of conditions and the following
497+
disclaimer in the documentation and/or other materials provided
498+
with the distribution.
499+
* Neither the name of Google Inc. nor the names of its
500+
contributors may be used to endorse or promote products derived
501+
from this software without specific prior written permission.
502+
503+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
504+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
505+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
506+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
507+
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
508+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
509+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
510+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
511+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
512+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
513+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
485514
"""
486515

487516
- libuv, located at deps/uv, is licensed as follows:

configure

+2-2
Original file line numberDiff line numberDiff line change
@@ -1135,8 +1135,8 @@ def glob_to_var(dir_base, dir_sub, patch_dir):
11351135
def configure_intl(o):
11361136
icus = [
11371137
{
1138-
'url': 'https://ssl.icu-project.org/files/icu4c/60.2/icu4c-60_2-src.zip',
1139-
'md5': '115908818fd0324530b2acb1b029738d',
1138+
'url': 'https://ssl.icu-project.org/files/icu4c/61.1/icu4c-61_1-src.zip',
1139+
'md5': '780d8524c8a860ed8d8f6fe75cb7ce3f',
11401140
},
11411141
]
11421142
def icu_download(path):

deps/icu-small/LICENSE

+31-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
COPYRIGHT AND PERMISSION NOTICE (ICU 58 and later)
22

3-
Copyright © 1991-2017 Unicode, Inc. All rights reserved.
4-
Distributed under the Terms of Use in http://www.unicode.org/copyright.html
3+
Copyright © 1991-2018 Unicode, Inc. All rights reserved.
4+
Distributed under the Terms of Use in http://www.unicode.org/copyright.html.
55

66
Permission is hereby granted, free of charge, to any person obtaining
77
a copy of the Unicode data files and any associated documentation
@@ -383,3 +383,32 @@ Database section 7.
383383
# by ICANN or the IETF Trust on the database or the code. Any person
384384
# making a contribution to the database or code waives all rights to
385385
# future claims in that contribution or in the TZ Database.
386+
387+
6. Google double-conversion
388+
389+
Copyright 2006-2011, the V8 project authors. All rights reserved.
390+
Redistribution and use in source and binary forms, with or without
391+
modification, are permitted provided that the following conditions are
392+
met:
393+
394+
* Redistributions of source code must retain the above copyright
395+
notice, this list of conditions and the following disclaimer.
396+
* Redistributions in binary form must reproduce the above
397+
copyright notice, this list of conditions and the following
398+
disclaimer in the documentation and/or other materials provided
399+
with the distribution.
400+
* Neither the name of Google Inc. nor the names of its
401+
contributors may be used to endorse or promote products derived
402+
from this software without specific prior written permission.
403+
404+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
405+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
406+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
407+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
408+
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
409+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
410+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
411+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
412+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
413+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
414+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

deps/icu-small/README-SMALL-ICU.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
Small ICU sources - auto generated by shrink-icu-src.py
22

33
This directory contains the ICU subset used by --with-intl=small-icu (the default)
4-
It is a strict subset of ICU 60 source files with the following exception(s):
5-
* deps/icu-small/source/data/in/icudt60l.dat : Reduced-size data file
4+
It is a strict subset of ICU 61 source files with the following exception(s):
5+
* deps/icu-small/source/data/in/icudt61l.dat : Reduced-size data file
66

77

88
To rebuild this directory, see ../../tools/icu/README.md

deps/icu-small/source/common/bmpset.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,9 @@ static void set32x64Bits(uint32_t table[64], int32_t start, int32_t limit) {
100100
++lead;
101101
}
102102
if(lead<limitLead) {
103-
bits=~((1<<lead)-1);
103+
bits=~(((unsigned)1<<lead)-1);
104104
if(limitLead<0x20) {
105-
bits&=(1<<limitLead)-1;
105+
bits&=((unsigned)1<<limitLead)-1;
106106
}
107107
for(trail=0; trail<64; ++trail) {
108108
table[trail]|=bits;

deps/icu-small/source/common/brkeng.cpp

+27-38
Original file line numberDiff line numberDiff line change
@@ -59,58 +59,47 @@ LanguageBreakFactory::~LanguageBreakFactory() {
5959
******************************************************************
6060
*/
6161

62-
UnhandledEngine::UnhandledEngine(UErrorCode &/*status*/) {
63-
for (int32_t i = 0; i < UPRV_LENGTHOF(fHandled); ++i) {
64-
fHandled[i] = 0;
65-
}
62+
UnhandledEngine::UnhandledEngine(UErrorCode &status) : fHandled(nullptr) {
63+
(void)status;
6664
}
6765

6866
UnhandledEngine::~UnhandledEngine() {
69-
for (int32_t i = 0; i < UPRV_LENGTHOF(fHandled); ++i) {
70-
if (fHandled[i] != 0) {
71-
delete fHandled[i];
72-
}
73-
}
67+
delete fHandled;
68+
fHandled = nullptr;
7469
}
7570

7671
UBool
77-
UnhandledEngine::handles(UChar32 c, int32_t breakType) const {
78-
return (breakType >= 0 && breakType < UPRV_LENGTHOF(fHandled)
79-
&& fHandled[breakType] != 0 && fHandled[breakType]->contains(c));
72+
UnhandledEngine::handles(UChar32 c) const {
73+
return fHandled && fHandled->contains(c);
8074
}
8175

8276
int32_t
8377
UnhandledEngine::findBreaks( UText *text,
8478
int32_t /* startPos */,
8579
int32_t endPos,
86-
int32_t breakType,
8780
UVector32 &/*foundBreaks*/ ) const {
88-
if (breakType >= 0 && breakType < UPRV_LENGTHOF(fHandled)) {
89-
UChar32 c = utext_current32(text);
90-
while((int32_t)utext_getNativeIndex(text) < endPos && fHandled[breakType]->contains(c)) {
91-
utext_next32(text); // TODO: recast loop to work with post-increment operations.
92-
c = utext_current32(text);
93-
}
81+
UChar32 c = utext_current32(text);
82+
while((int32_t)utext_getNativeIndex(text) < endPos && fHandled->contains(c)) {
83+
utext_next32(text); // TODO: recast loop to work with post-increment operations.
84+
c = utext_current32(text);
9485
}
9586
return 0;
9687
}
9788

9889
void
99-
UnhandledEngine::handleCharacter(UChar32 c, int32_t breakType) {
100-
if (breakType >= 0 && breakType < UPRV_LENGTHOF(fHandled)) {
101-
if (fHandled[breakType] == 0) {
102-
fHandled[breakType] = new UnicodeSet();
103-
if (fHandled[breakType] == 0) {
104-
return;
105-
}
106-
}
107-
if (!fHandled[breakType]->contains(c)) {
108-
UErrorCode status = U_ZERO_ERROR;
109-
// Apply the entire script of the character.
110-
int32_t script = u_getIntPropertyValue(c, UCHAR_SCRIPT);
111-
fHandled[breakType]->applyIntPropertyValue(UCHAR_SCRIPT, script, status);
90+
UnhandledEngine::handleCharacter(UChar32 c) {
91+
if (fHandled == nullptr) {
92+
fHandled = new UnicodeSet();
93+
if (fHandled == nullptr) {
94+
return;
11295
}
11396
}
97+
if (!fHandled->contains(c)) {
98+
UErrorCode status = U_ZERO_ERROR;
99+
// Apply the entire script of the character.
100+
int32_t script = u_getIntPropertyValue(c, UCHAR_SCRIPT);
101+
fHandled->applyIntPropertyValue(UCHAR_SCRIPT, script, status);
102+
}
114103
}
115104

116105
/*
@@ -138,7 +127,7 @@ U_NAMESPACE_BEGIN
138127
static UMutex gBreakEngineMutex = U_MUTEX_INITIALIZER;
139128

140129
const LanguageBreakEngine *
141-
ICULanguageBreakFactory::getEngineFor(UChar32 c, int32_t breakType) {
130+
ICULanguageBreakFactory::getEngineFor(UChar32 c) {
142131
const LanguageBreakEngine *lbe = NULL;
143132
UErrorCode status = U_ZERO_ERROR;
144133

@@ -156,26 +145,26 @@ ICULanguageBreakFactory::getEngineFor(UChar32 c, int32_t breakType) {
156145
int32_t i = fEngines->size();
157146
while (--i >= 0) {
158147
lbe = (const LanguageBreakEngine *)(fEngines->elementAt(i));
159-
if (lbe != NULL && lbe->handles(c, breakType)) {
148+
if (lbe != NULL && lbe->handles(c)) {
160149
return lbe;
161150
}
162151
}
163152
}
164153

165154
// We didn't find an engine. Create one.
166-
lbe = loadEngineFor(c, breakType);
155+
lbe = loadEngineFor(c);
167156
if (lbe != NULL) {
168157
fEngines->push((void *)lbe, status);
169158
}
170159
return lbe;
171160
}
172161

173162
const LanguageBreakEngine *
174-
ICULanguageBreakFactory::loadEngineFor(UChar32 c, int32_t breakType) {
163+
ICULanguageBreakFactory::loadEngineFor(UChar32 c) {
175164
UErrorCode status = U_ZERO_ERROR;
176165
UScriptCode code = uscript_getScript(c, &status);
177166
if (U_SUCCESS(status)) {
178-
DictionaryMatcher *m = loadDictionaryMatcherFor(code, breakType);
167+
DictionaryMatcher *m = loadDictionaryMatcherFor(code);
179168
if (m != NULL) {
180169
const LanguageBreakEngine *engine = NULL;
181170
switch(code) {
@@ -236,7 +225,7 @@ ICULanguageBreakFactory::loadEngineFor(UChar32 c, int32_t breakType) {
236225
}
237226

238227
DictionaryMatcher *
239-
ICULanguageBreakFactory::loadDictionaryMatcherFor(UScriptCode script, int32_t /* brkType */) {
228+
ICULanguageBreakFactory::loadDictionaryMatcherFor(UScriptCode script) {
240229
UErrorCode status = U_ZERO_ERROR;
241230
// open root from brkitr tree.
242231
UResourceBundle *b = ures_open(U_ICUDATA_BRKITR, "", &status);

deps/icu-small/source/common/brkeng.h

+9-24
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,10 @@ class LanguageBreakEngine : public UMemory {
5454
* a particular kind of break.</p>
5555
*
5656
* @param c A character which begins a run that the engine might handle
57-
* @param breakType The type of text break which the caller wants to determine
5857
* @return TRUE if this engine handles the particular character and break
5958
* type.
6059
*/
61-
virtual UBool handles(UChar32 c, int32_t breakType) const = 0;
60+
virtual UBool handles(UChar32 c) const = 0;
6261

6362
/**
6463
* <p>Find any breaks within a run in the supplied text.</p>
@@ -68,14 +67,12 @@ class LanguageBreakEngine : public UMemory {
6867
* is capable of handling.
6968
* @param startPos The start of the run within the supplied text.
7069
* @param endPos The end of the run within the supplied text.
71-
* @param breakType The type of break desired, or -1.
7270
* @param foundBreaks A Vector of int32_t to receive the breaks.
7371
* @return The number of breaks found.
7472
*/
7573
virtual int32_t findBreaks( UText *text,
7674
int32_t startPos,
7775
int32_t endPos,
78-
int32_t breakType,
7976
UVector32 &foundBreaks ) const = 0;
8077

8178
};
@@ -125,11 +122,9 @@ class LanguageBreakFactory : public UMemory {
125122
*
126123
* @param c A character that begins a run for which a LanguageBreakEngine is
127124
* sought.
128-
* @param breakType The kind of text break for which a LanguageBreakEngine is
129-
* sought.
130125
* @return A LanguageBreakEngine with the desired characteristics, or 0.
131126
*/
132-
virtual const LanguageBreakEngine *getEngineFor(UChar32 c, int32_t breakType) = 0;
127+
virtual const LanguageBreakEngine *getEngineFor(UChar32 c) = 0;
133128

134129
};
135130

@@ -152,11 +147,11 @@ class UnhandledEngine : public LanguageBreakEngine {
152147
private:
153148

154149
/**
155-
* The sets of characters handled, for each break type
150+
* The sets of characters handled.
156151
* @internal
157152
*/
158153

159-
UnicodeSet *fHandled[4];
154+
UnicodeSet *fHandled;
160155

161156
public:
162157

@@ -176,11 +171,10 @@ class UnhandledEngine : public LanguageBreakEngine {
176171
* a particular kind of break.</p>
177172
*
178173
* @param c A character which begins a run that the engine might handle
179-
* @param breakType The type of text break which the caller wants to determine
180174
* @return TRUE if this engine handles the particular character and break
181175
* type.
182176
*/
183-
virtual UBool handles(UChar32 c, int32_t breakType) const;
177+
virtual UBool handles(UChar32 c) const;
184178

185179
/**
186180
* <p>Find any breaks within a run in the supplied text.</p>
@@ -190,23 +184,20 @@ class UnhandledEngine : public LanguageBreakEngine {
190184
* is capable of handling.
191185
* @param startPos The start of the run within the supplied text.
192186
* @param endPos The end of the run within the supplied text.
193-
* @param breakType The type of break desired, or -1.
194187
* @param foundBreaks An allocated C array of the breaks found, if any
195188
* @return The number of breaks found.
196189
*/
197190
virtual int32_t findBreaks( UText *text,
198191
int32_t startPos,
199192
int32_t endPos,
200-
int32_t breakType,
201193
UVector32 &foundBreaks ) const;
202194

203195
/**
204196
* <p>Tell the engine to handle a particular character and break type.</p>
205197
*
206198
* @param c A character which the engine should handle
207-
* @param breakType The type of text break for which the engine should handle c
208199
*/
209-
virtual void handleCharacter(UChar32 c, int32_t breakType);
200+
virtual void handleCharacter(UChar32 c);
210201

211202
};
212203

@@ -250,11 +241,9 @@ class ICULanguageBreakFactory : public LanguageBreakFactory {
250241
*
251242
* @param c A character that begins a run for which a LanguageBreakEngine is
252243
* sought.
253-
* @param breakType The kind of text break for which a LanguageBreakEngine is
254-
* sought.
255244
* @return A LanguageBreakEngine with the desired characteristics, or 0.
256245
*/
257-
virtual const LanguageBreakEngine *getEngineFor(UChar32 c, int32_t breakType);
246+
virtual const LanguageBreakEngine *getEngineFor(UChar32 c);
258247

259248
protected:
260249
/**
@@ -263,21 +252,17 @@ class ICULanguageBreakFactory : public LanguageBreakFactory {
263252
*
264253
* @param c A character that begins a run for which a LanguageBreakEngine is
265254
* sought.
266-
* @param breakType The kind of text break for which a LanguageBreakEngine is
267-
* sought.
268255
* @return A LanguageBreakEngine with the desired characteristics, or 0.
269256
*/
270-
virtual const LanguageBreakEngine *loadEngineFor(UChar32 c, int32_t breakType);
257+
virtual const LanguageBreakEngine *loadEngineFor(UChar32 c);
271258

272259
/**
273260
* <p>Create a DictionaryMatcher for the specified script and break type.</p>
274261
* @param script An ISO 15924 script code that identifies the dictionary to be
275262
* created.
276-
* @param breakType The kind of text break for which a dictionary is
277-
* sought.
278263
* @return A DictionaryMatcher with the desired characteristics, or NULL.
279264
*/
280-
virtual DictionaryMatcher *loadDictionaryMatcherFor(UScriptCode script, int32_t breakType);
265+
virtual DictionaryMatcher *loadDictionaryMatcherFor(UScriptCode script);
281266
};
282267

283268
U_NAMESPACE_END

0 commit comments

Comments
 (0)