Skip to content

Commit 2d5d7e0

Browse files
Merge
2 parents 962bdd1 + 582d999 commit 2d5d7e0

File tree

425 files changed

+33095
-16616
lines changed

Some content is hidden

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

425 files changed

+33095
-16616
lines changed

modules/javafx.web/src/main/legal/icu_web.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
## IBM International Components for Unicode (ICU4C) v62.1
1+
## IBM International Components for Unicode (ICU4C) v64.2
22

33
### ICU License
44
```
55
66
COPYRIGHT AND PERMISSION NOTICE (ICU 58 and later)
77
8-
Copyright © 1991-2018 Unicode, Inc. All rights reserved.
9-
Distributed under the Terms of Use in http://www.unicode.org/copyright.html.
8+
Copyright © 1991-2019 Unicode, Inc. All rights reserved.
9+
Distributed under the Terms of Use in https://www.unicode.org/copyright.html.
1010
1111
Permission is hereby granted, free of charge, to any person obtaining
1212
a copy of the Unicode data files and any associated documentation

modules/javafx.web/src/main/native/Source/ThirdParty/icu/CMakeLists.txt

+26-3
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ set(ICU_COMMON_SOURCES
8181
source/common/bytestrie.cpp
8282
source/common/bytestrieiterator.cpp
8383
source/common/caniter.cpp
84+
source/common/characterproperties.cpp
8485
source/common/chariter.cpp
8586
source/common/charstr.cpp
8687
source/common/cmemory.cpp
@@ -96,8 +97,8 @@ set(ICU_COMMON_SOURCES
9697
source/common/filterednormalizer2.cpp
9798
source/common/icudataver.cpp
9899
source/common/icuplug.cpp
99-
source/common/listformatter.cpp
100100
source/common/loadednormalizer2impl.cpp
101+
source/common/localebuilder.cpp
101102
source/common/locavailable.cpp
102103
source/common/locbased.cpp
103104
source/common/locdispnames.cpp
@@ -186,6 +187,7 @@ set(ICU_COMMON_SOURCES
186187
source/common/ucnv_u7.cpp
187188
source/common/ucnv_u8.cpp
188189
source/common/ucol_swp.cpp
190+
source/common/ucptrie.cpp
189191
source/common/ucurr.cpp
190192
source/common/udata.cpp
191193
source/common/udatamem.cpp
@@ -198,12 +200,12 @@ set(ICU_COMMON_SOURCES
198200
source/common/uinvchar.cpp
199201
source/common/uiter.cpp
200202
source/common/ulist.cpp
201-
source/common/ulistformatter.cpp
202203
source/common/uloc.cpp
203204
source/common/uloc_keytype.cpp
204205
source/common/uloc_tag.cpp
205206
source/common/umapfile.cpp
206207
source/common/umath.cpp
208+
source/common/umutablecptrie.cpp
207209
source/common/umutex.cpp
208210
source/common/unames.cpp
209211
source/common/unifiedcache.cpp
@@ -250,6 +252,7 @@ set(ICU_COMMON_SOURCES
250252
source/common/util_props.cpp
251253
source/common/utrace.cpp
252254
source/common/utrie2_builder.cpp
255+
source/common/utrie_swap.cpp
253256
source/common/utrie2.cpp
254257
source/common/utrie.cpp
255258
source/common/uts46.cpp
@@ -343,11 +346,15 @@ set(ICU_I18N_SOURCES
343346
source/i18n/dtitvinf.cpp
344347
source/i18n/dtptngen.cpp
345348
source/i18n/dtrule.cpp
349+
source/i18n/erarules.cpp
346350
source/i18n/esctrn.cpp
347351
source/i18n/ethpccal.cpp
348352
source/i18n/fmtable.cpp
349353
source/i18n/fmtable_cnv.cpp
350354
source/i18n/format.cpp
355+
source/i18n/formattedval_iterimpl.cpp
356+
source/i18n/formattedval_sbimpl.cpp
357+
source/i18n/formattedvalue.cpp
351358
source/i18n/fphdlimp.cpp
352359
source/i18n/fpositer.cpp
353360
source/i18n/funcrepl.cpp
@@ -359,6 +366,7 @@ set(ICU_I18N_SOURCES
359366
source/i18n/inputext.cpp
360367
source/i18n/islamcal.cpp
361368
source/i18n/japancal.cpp
369+
source/i18n/listformatter.cpp
362370
source/i18n/measfmt.cpp
363371
source/i18n/measunit.cpp
364372
source/i18n/measure.cpp
@@ -386,6 +394,7 @@ set(ICU_I18N_SOURCES
386394
source/i18n/number_modifiers.cpp
387395
source/i18n/number_multiplier.cpp
388396
source/i18n/number_notation.cpp
397+
source/i18n/number_output.cpp
389398
source/i18n/number_padding.cpp
390399
source/i18n/number_patternmodifier.cpp
391400
source/i18n/number_patternstring.cpp
@@ -405,6 +414,8 @@ set(ICU_I18N_SOURCES
405414
source/i18n/numparse_stringsegment.cpp
406415
source/i18n/numparse_symbols.cpp
407416
source/i18n/numparse_validators.cpp
417+
source/i18n/numrange_fluent.cpp
418+
source/i18n/numrange_impl.cpp
408419
source/i18n/numsys.cpp
409420
source/i18n/olsontz.cpp
410421
source/i18n/persncal.cpp
@@ -472,6 +483,7 @@ set(ICU_I18N_SOURCES
472483
source/i18n/udatpg.cpp
473484
source/i18n/ufieldpositer.cpp
474485
source/i18n/uitercollationiterator.cpp
486+
source/i18n/ulistformatter.cpp
475487
source/i18n/ulocdata.cpp
476488
source/i18n/umsg.cpp
477489
source/i18n/unesctrn.cpp
@@ -519,22 +531,33 @@ target_link_libraries(icui18n PUBLIC icuuc)
519531

520532
###### tools BEGIN ####
521533
set(ICU_TOOLSUTILS_SOURCES
534+
source/tools/toolutil/collationinfo.cpp
535+
source/tools/toolutil/dbgutil.cpp
536+
source/tools/toolutil/denseranges.cpp
522537
source/tools/toolutil/filestrm.cpp
538+
source/tools/toolutil/filetools.cpp
539+
source/tools/toolutil/flagparser.cpp
523540
source/tools/toolutil/package.cpp
524541
source/tools/toolutil/pkgitems.cpp
542+
source/tools/toolutil/ppucd.cpp
525543
source/tools/toolutil/swapimpl.cpp
526544
source/tools/toolutil/toolutil.cpp
527545
source/tools/toolutil/unewdata.cpp
546+
source/tools/toolutil/ucln_tu.cpp
528547
source/tools/toolutil/ucm.cpp
529548
source/tools/toolutil/ucmstate.cpp
549+
source/tools/toolutil/udbgutil.cpp
550+
source/tools/toolutil/uoptions.cpp
530551
source/tools/toolutil/uparse.cpp
531552
source/tools/toolutil/ucbuf.cpp
532553
source/tools/toolutil/writesrc.cpp
533554
source/tools/toolutil/pkg_genc.cpp
534555
source/tools/toolutil/pkg_gencmn.cpp
556+
source/tools/toolutil/pkg_icu.cpp
557+
source/tools/toolutil/xmlparser.cpp
535558

536559
java/data/data_as_asm.cpp
537-
source/stubdata/stubdata.cpp
560+
source/stubdata/stubdata.cpp
538561
)
539562

540563
add_executable(data_as_asm ${ICU_TOOLSUTILS_SOURCES})

modules/javafx.web/src/main/native/Source/ThirdParty/icu/LICENSE

+2-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-2018 Unicode, Inc. All rights reserved.
4-
Distributed under the Terms of Use in http://www.unicode.org/copyright.html.
3+
Copyright © 1991-2019 Unicode, Inc. All rights reserved.
4+
Distributed under the Terms of Use in https://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

modules/javafx.web/src/main/native/Source/ThirdParty/icu/source/common/bmpset.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -241,13 +241,13 @@ void BMPSet::overrideIllegal() {
241241
bmpBlockBits[i]|=bits;
242242
}
243243

244-
mask=~(0x10001<<0xd); // Lead byte 0xED.
244+
mask= static_cast<uint32_t>(~(0x10001<<0xd)); // Lead byte 0xED.
245245
bits=1<<0xd;
246246
for(i=32; i<64; ++i) { // Second half of 4k block.
247247
bmpBlockBits[i]=(bmpBlockBits[i]&mask)|bits;
248248
}
249249
} else {
250-
mask=~(0x10001<<0xd); // Lead byte 0xED.
250+
mask= static_cast<uint32_t>(~(0x10001<<0xd)); // Lead byte 0xED.
251251
for(i=32; i<64; ++i) { // Second half of 4k block.
252252
bmpBlockBits[i]&=mask;
253253
}

modules/javafx.web/src/main/native/Source/ThirdParty/icu/source/common/brkeng.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -124,13 +124,12 @@ static void U_CALLCONV _deleteEngine(void *obj) {
124124
U_CDECL_END
125125
U_NAMESPACE_BEGIN
126126

127-
static UMutex gBreakEngineMutex = U_MUTEX_INITIALIZER;
128-
129127
const LanguageBreakEngine *
130128
ICULanguageBreakFactory::getEngineFor(UChar32 c) {
131129
const LanguageBreakEngine *lbe = NULL;
132130
UErrorCode status = U_ZERO_ERROR;
133131

132+
static UMutex gBreakEngineMutex = U_MUTEX_INITIALIZER;
134133
Mutex m(&gBreakEngineMutex);
135134

136135
if (fEngines == NULL) {

modules/javafx.web/src/main/native/Source/ThirdParty/icu/source/common/bytesinkutil.cpp

+38
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#include "unicode/utf8.h"
1212
#include "unicode/utf16.h"
1313
#include "bytesinkutil.h"
14+
#include "charstr.h"
1415
#include "cmemory.h"
1516
#include "uassert.h"
1617

@@ -120,4 +121,41 @@ ByteSinkUtil::appendUnchanged(const uint8_t *s, const uint8_t *limit,
120121
return TRUE;
121122
}
122123

124+
CharStringByteSink::CharStringByteSink(CharString* dest) : dest_(*dest) {
125+
}
126+
127+
CharStringByteSink::~CharStringByteSink() = default;
128+
129+
void
130+
CharStringByteSink::Append(const char* bytes, int32_t n) {
131+
UErrorCode status = U_ZERO_ERROR;
132+
dest_.append(bytes, n, status);
133+
// Any errors are silently ignored.
134+
}
135+
136+
char*
137+
CharStringByteSink::GetAppendBuffer(int32_t min_capacity,
138+
int32_t desired_capacity_hint,
139+
char* scratch,
140+
int32_t scratch_capacity,
141+
int32_t* result_capacity) {
142+
if (min_capacity < 1 || scratch_capacity < min_capacity) {
143+
*result_capacity = 0;
144+
return nullptr;
145+
}
146+
147+
UErrorCode status = U_ZERO_ERROR;
148+
char* result = dest_.getAppendBuffer(
149+
min_capacity,
150+
desired_capacity_hint,
151+
*result_capacity,
152+
status);
153+
if (U_SUCCESS(status)) {
154+
return result;
155+
}
156+
157+
*result_capacity = scratch_capacity;
158+
return scratch;
159+
}
160+
123161
U_NAMESPACE_END

modules/javafx.web/src/main/native/Source/ThirdParty/icu/source/common/bytesinkutil.h

+22
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
U_NAMESPACE_BEGIN
1414

1515
class ByteSink;
16+
class CharString;
1617
class Edits;
1718

1819
class U_COMMON_API ByteSinkUtil {
@@ -58,4 +59,25 @@ class U_COMMON_API ByteSinkUtil {
5859
ByteSink &sink, uint32_t options, Edits *edits);
5960
};
6061

62+
class CharStringByteSink : public ByteSink {
63+
public:
64+
CharStringByteSink(CharString* dest);
65+
~CharStringByteSink() override;
66+
67+
CharStringByteSink() = delete;
68+
CharStringByteSink(const CharStringByteSink&) = delete;
69+
CharStringByteSink& operator=(const CharStringByteSink&) = delete;
70+
71+
void Append(const char* bytes, int32_t n) override;
72+
73+
char* GetAppendBuffer(int32_t min_capacity,
74+
int32_t desired_capacity_hint,
75+
char* scratch,
76+
int32_t scratch_capacity,
77+
int32_t* result_capacity) override;
78+
79+
private:
80+
CharString& dest_;
81+
};
82+
6183
U_NAMESPACE_END

modules/javafx.web/src/main/native/Source/ThirdParty/icu/source/common/bytestriebuilder.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,8 @@ BytesTrieBuilder::indexOfElementWithNextUnit(int32_t i, int32_t byteIndex, UChar
339339

340340
BytesTrieBuilder::BTLinearMatchNode::BTLinearMatchNode(const char *bytes, int32_t len, Node *nextNode)
341341
: LinearMatchNode(len, nextNode), s(bytes) {
342-
hash=hash*37+ustr_hashCharsN(bytes, len);
342+
hash=static_cast<int32_t>(
343+
static_cast<uint32_t>(hash)*37u + static_cast<uint32_t>(ustr_hashCharsN(bytes, len)));
343344
}
344345

345346
UBool
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
// © 2018 and later: Unicode, Inc. and others.
2+
// License & terms of use: http://www.unicode.org/copyright.html
3+
4+
#ifndef __CAPI_HELPER_H__
5+
#define __CAPI_HELPER_H__
6+
7+
#include "unicode/utypes.h"
8+
9+
U_NAMESPACE_BEGIN
10+
11+
/**
12+
* An internal helper class to help convert between C and C++ APIs.
13+
*/
14+
template<typename CType, typename CPPType, int32_t kMagic>
15+
class IcuCApiHelper {
16+
public:
17+
/**
18+
* Convert from the C type to the C++ type (const version).
19+
*/
20+
static const CPPType* validate(const CType* input, UErrorCode& status);
21+
22+
/**
23+
* Convert from the C type to the C++ type (non-const version).
24+
*/
25+
static CPPType* validate(CType* input, UErrorCode& status);
26+
27+
/**
28+
* Convert from the C++ type to the C type (const version).
29+
*/
30+
const CType* exportConstForC() const;
31+
32+
/**
33+
* Convert from the C++ type to the C type (non-const version).
34+
*/
35+
CType* exportForC();
36+
37+
/**
38+
* Invalidates the object.
39+
*/
40+
~IcuCApiHelper();
41+
42+
private:
43+
/**
44+
* While the object is valid, fMagic equals kMagic.
45+
*/
46+
int32_t fMagic = kMagic;
47+
};
48+
49+
50+
template<typename CType, typename CPPType, int32_t kMagic>
51+
const CPPType*
52+
IcuCApiHelper<CType, CPPType, kMagic>::validate(const CType* input, UErrorCode& status) {
53+
if (U_FAILURE(status)) {
54+
return nullptr;
55+
}
56+
if (input == nullptr) {
57+
status = U_ILLEGAL_ARGUMENT_ERROR;
58+
return nullptr;
59+
}
60+
auto* impl = reinterpret_cast<const CPPType*>(input);
61+
if (static_cast<const IcuCApiHelper<CType, CPPType, kMagic>*>(impl)->fMagic != kMagic) {
62+
status = U_INVALID_FORMAT_ERROR;
63+
return nullptr;
64+
}
65+
return impl;
66+
}
67+
68+
template<typename CType, typename CPPType, int32_t kMagic>
69+
CPPType*
70+
IcuCApiHelper<CType, CPPType, kMagic>::validate(CType* input, UErrorCode& status) {
71+
auto* constInput = static_cast<const CType*>(input);
72+
auto* validated = validate(constInput, status);
73+
return const_cast<CPPType*>(validated);
74+
}
75+
76+
template<typename CType, typename CPPType, int32_t kMagic>
77+
const CType*
78+
IcuCApiHelper<CType, CPPType, kMagic>::exportConstForC() const {
79+
return reinterpret_cast<const CType*>(static_cast<const CPPType*>(this));
80+
}
81+
82+
template<typename CType, typename CPPType, int32_t kMagic>
83+
CType*
84+
IcuCApiHelper<CType, CPPType, kMagic>::exportForC() {
85+
return reinterpret_cast<CType*>(static_cast<CPPType*>(this));
86+
}
87+
88+
template<typename CType, typename CPPType, int32_t kMagic>
89+
IcuCApiHelper<CType, CPPType, kMagic>::~IcuCApiHelper() {
90+
// head off application errors by preventing use of of deleted objects.
91+
fMagic = 0;
92+
}
93+
94+
95+
U_NAMESPACE_END
96+
97+
#endif // __CAPI_HELPER_H__

0 commit comments

Comments
 (0)