Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v14.x] Backport Apple silicon support #38051

Closed
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
e0b3523
deps: cherry-pick f4376ec801e1ded from V8 upstream
danbev Feb 4, 2021
292dffe
test: add arm64 arch to test-worker-prof status
danbev Feb 4, 2021
15ed780
deps: V8: cherry-pick beebee4f80ff
psmarshall Aug 5, 2020
69057eb
test: add cpu-profiler-crash test
santigimeno Feb 9, 2021
a7acd72
worker: add eventLoopUtilization()
trevnorris Oct 14, 2020
78c42ac
test: correct test-worker-eventlooputil
Flarna Oct 31, 2020
b297c11
doc: upgrade stability status of report API
gireeshpunathil Oct 15, 2020
44d6862
doc: fix YAML lint error on master
Trott Oct 19, 2020
1ca213c
dns: add setLocalAddress to Resolver
daguej Aug 18, 2020
c5a61d3
test: refactor coverage logic
bcoe Oct 23, 2020
772afde
doc: fix typo in BUILDING.md
RaisinTen Oct 26, 2020
a2a3b70
child_process: add ChildProcess 'spawn' event
zenflow Sep 27, 2020
372fa0f
tools: add msvc /P output to .gitignore
gengjiawen Oct 21, 2020
4594961
src: add loop idle time in diagnostic report
gireeshpunathil Nov 3, 2020
e8ec2a6
deps: upgrade to libuv 1.41.0
cjihrig Feb 13, 2021
2b33ec4
deps: update ICU to 68.1
targos Nov 20, 2020
0d2752e
tools: fix md5 hash for ICU 68.1 src
richardlau Jan 4, 2021
966eee7
deps: update ICU to 68.2
targos Jan 18, 2021
efb88ee
doc: fix maintaining ICU guide
targos Jan 18, 2021
8899f47
tools: cleanup old ICU version-specific fixes
targos Jan 18, 2021
6562506
errors: print original exception context
bcoe Mar 10, 2021
cb9ec6d
deps: upgrade npm to 6.14.12
ruyadorno Mar 25, 2021
fe5e2e3
deps: v8 backport 9689b17687b
guybedford Mar 22, 2021
697d6a0
deps: V8: cherry-pick c6ec36a6
oleavr Nov 6, 2020
68f8f4b
deps: V8: cherry-pick 086eecbd96b6
oleavr Nov 6, 2020
6be68ce
deps: V8: cherry-pick 4e077ff0444a
oleavr Nov 6, 2020
bb7e82e
deps: V8: cherry-pick 1d0f426311d4i
oleavr Nov 6, 2020
c2d8aef
test: add SIGTRAP to test-signal-handler
Dec 3, 2020
62f250d
deps: V8: cherry-pick 0c8b6e415c30
matinzd Feb 8, 2021
270801c
deps: cherry-pick 8957d4677aa794c230577f234071af0 from V8 upstream
aduh95 Jan 4, 2021
83501fd
deps: v8: cherry-pick cf71540c
a60814billy Apr 2, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
deps: update ICU to 68.2
Refs: https://github.com/unicode-org/icu/releases/tag/release-68-2

PR-URL: #36980
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Beth Griggs <bgriggs@redhat.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
  • Loading branch information
targos committed Mar 3, 2021
commit 966eee7c5c5776f5cb884475b1227e171b5904b2
14 changes: 8 additions & 6 deletions deps/icu-small/source/common/cmemory.h
Original file line number Diff line number Diff line change
Expand Up @@ -725,9 +725,14 @@ class MemoryPool : public UMemory {
}

MemoryPool& operator=(MemoryPool&& other) U_NOEXCEPT {
fCount = other.fCount;
fPool = std::move(other.fPool);
other.fCount = 0;
// Since `this` may contain instances that need to be deleted, we can't
// just throw them away and replace them with `other`. The normal way of
// dealing with this in C++ is to swap `this` and `other`, rather than
// simply overwrite: the destruction of `other` can then take care of
// running MemoryPool::~MemoryPool() over the still-to-be-deallocated
// instances.
std::swap(fCount, other.fCount);
std::swap(fPool, other.fPool);
return *this;
}

Expand Down Expand Up @@ -796,9 +801,6 @@ class MemoryPool : public UMemory {
template<typename T, int32_t stackCapacity = 8>
class MaybeStackVector : protected MemoryPool<T, stackCapacity> {
public:
using MemoryPool<T, stackCapacity>::MemoryPool;
using MemoryPool<T, stackCapacity>::operator=;

template<typename... Args>
T* emplaceBack(Args&&... args) {
return this->create(args...);
Expand Down
33 changes: 22 additions & 11 deletions deps/icu-small/source/common/locid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@

#include "unicode/bytestream.h"
#include "unicode/locid.h"
#include "unicode/localebuilder.h"
#include "unicode/strenum.h"
#include "unicode/stringpiece.h"
#include "unicode/uloc.h"
Expand Down Expand Up @@ -1028,7 +1029,7 @@ class AliasReplacer {
// place the the replaced locale ID in out and return true.
// Otherwise return false for no replacement or error.
bool replace(
const Locale& locale, CharString& out, UErrorCode status);
const Locale& locale, CharString& out, UErrorCode& status);

private:
const char* language;
Expand Down Expand Up @@ -1336,10 +1337,13 @@ AliasReplacer::replaceTerritory(UVector& toBeFreed, UErrorCode& status)
// Cannot use nullptr for language because that will construct
// the default locale, in that case, use "und" to get the correct
// locale.
Locale l(language == nullptr ? "und" : language, nullptr, script);
Locale l = LocaleBuilder()
.setLanguage(language == nullptr ? "und" : language)
.setScript(script)
.build(status);
l.addLikelySubtags(status);
const char* likelyRegion = l.getCountry();
CharString* item = nullptr;
LocalPointer<CharString> item;
if (likelyRegion != nullptr && uprv_strlen(likelyRegion) > 0) {
size_t len = uprv_strlen(likelyRegion);
const char* foundInReplacement = uprv_strstr(replacement,
Expand All @@ -1351,20 +1355,22 @@ AliasReplacer::replaceTerritory(UVector& toBeFreed, UErrorCode& status)
*(foundInReplacement-1) == ' ');
U_ASSERT(foundInReplacement[len] == ' ' ||
foundInReplacement[len] == '\0');
item = new CharString(foundInReplacement, (int32_t)len, status);
item.adoptInsteadAndCheckErrorCode(
new CharString(foundInReplacement, (int32_t)len, status), status);
}
}
if (item == nullptr) {
item = new CharString(replacement,
(int32_t)(firstSpace - replacement), status);
if (item.isNull() && U_SUCCESS(status)) {
item.adoptInsteadAndCheckErrorCode(
new CharString(replacement,
(int32_t)(firstSpace - replacement), status), status);
}
if (U_FAILURE(status)) { return false; }
if (item == nullptr) {
if (item.isNull()) {
status = U_MEMORY_ALLOCATION_ERROR;
return false;
}
replacedRegion = item->data();
toBeFreed.addElement(item, status);
toBeFreed.addElement(item.orphan(), status);
}
U_ASSERT(!same(region, replacedRegion));
region = replacedRegion;
Expand Down Expand Up @@ -1453,7 +1459,7 @@ AliasReplacer::outputToString(
int32_t variantsStart = out.length();
for (int32_t i = 0; i < variants.size(); i++) {
out.append(SEP_CHAR, status)
.append((const char*)((UVector*)variants.elementAt(i)),
.append((const char*)(variants.elementAt(i)),
status);
}
T_CString_toUpperCase(out.data() + variantsStart);
Expand All @@ -1470,7 +1476,7 @@ AliasReplacer::outputToString(
}

bool
AliasReplacer::replace(const Locale& locale, CharString& out, UErrorCode status)
AliasReplacer::replace(const Locale& locale, CharString& out, UErrorCode& status)
{
data = AliasData::singleton(status);
if (U_FAILURE(status)) {
Expand Down Expand Up @@ -2453,9 +2459,13 @@ Locale::setKeywordValue(const char* keywordName, const char* keywordValue, UErro
if (U_FAILURE(status)) {
return;
}
if (status == U_STRING_NOT_TERMINATED_WARNING) {
status = U_ZERO_ERROR;
}
int32_t bufferLength = uprv_max((int32_t)(uprv_strlen(fullName) + 1), ULOC_FULLNAME_CAPACITY);
int32_t newLength = uloc_setKeywordValue(keywordName, keywordValue, fullName,
bufferLength, &status) + 1;
U_ASSERT(status != U_STRING_NOT_TERMINATED_WARNING);
/* Handle the case the current buffer is not enough to hold the new id */
if (status == U_BUFFER_OVERFLOW_ERROR) {
U_ASSERT(newLength > bufferLength);
Expand All @@ -2472,6 +2482,7 @@ Locale::setKeywordValue(const char* keywordName, const char* keywordValue, UErro
fullName = newFullName;
status = U_ZERO_ERROR;
uloc_setKeywordValue(keywordName, keywordValue, fullName, newLength, &status);
U_ASSERT(status != U_STRING_NOT_TERMINATED_WARNING);
} else {
U_ASSERT(newLength <= bufferLength);
}
Expand Down
18 changes: 10 additions & 8 deletions deps/icu-small/source/common/rbbitblb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1402,12 +1402,13 @@ void RBBITableBuilder::exportTable(void *where) {
U_ASSERT (sd->fAccepting <= 255);
U_ASSERT (sd->fLookAhead <= 255);
U_ASSERT (0 <= sd->fTagsIdx && sd->fTagsIdx <= 255);
row->r8.fAccepting = sd->fAccepting;
row->r8.fLookAhead = sd->fLookAhead;
row->r8.fTagsIdx = sd->fTagsIdx;
RBBIStateTableRow8 *r8 = (RBBIStateTableRow8*)row;
r8->fAccepting = sd->fAccepting;
r8->fLookAhead = sd->fLookAhead;
r8->fTagsIdx = sd->fTagsIdx;
for (col=0; col<catCount; col++) {
U_ASSERT (sd->fDtran->elementAti(col) <= kMaxStateFor8BitsTable);
row->r8.fNextState[col] = sd->fDtran->elementAti(col);
r8->fNextState[col] = sd->fDtran->elementAti(col);
}
} else {
U_ASSERT (sd->fAccepting <= 0xffff);
Expand Down Expand Up @@ -1603,12 +1604,13 @@ void RBBITableBuilder::exportSafeTable(void *where) {
UnicodeString *rowString = (UnicodeString *)fSafeTable->elementAt(state);
RBBIStateTableRow *row = (RBBIStateTableRow *)(table->fTableData + state*table->fRowLen);
if (use8BitsForSafeTable()) {
row->r8.fAccepting = 0;
row->r8.fLookAhead = 0;
row->r8.fTagsIdx = 0;
RBBIStateTableRow8 *r8 = (RBBIStateTableRow8*)row;
r8->fAccepting = 0;
r8->fLookAhead = 0;
r8->fTagsIdx = 0;
for (col=0; col<catCount; col++) {
U_ASSERT(rowString->charAt(col) <= kMaxStateFor8BitsTable);
row->r8.fNextState[col] = static_cast<uint8_t>(rowString->charAt(col));
r8->fNextState[col] = static_cast<uint8_t>(rowString->charAt(col));
}
} else {
row->r16.fAccepting = 0;
Expand Down
21 changes: 20 additions & 1 deletion deps/icu-small/source/common/uloc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -877,6 +877,9 @@ uloc_setKeywordValue(const char* keywordName,
if(U_FAILURE(*status)) {
return -1;
}
if (*status == U_STRING_NOT_TERMINATED_WARNING) {
*status = U_ZERO_ERROR;
}
if (keywordName == NULL || keywordName[0] == 0 || bufferCapacity <= 1) {
*status = U_ILLEGAL_ARGUMENT_ERROR;
return 0;
Expand Down Expand Up @@ -914,6 +917,7 @@ uloc_setKeywordValue(const char* keywordName,
startSearchHere = (char*)locale_getKeywordsStart(buffer);
if(startSearchHere == NULL || (startSearchHere[1]==0)) {
if(keywordValueLen == 0) { /* no keywords = nothing to remove */
U_ASSERT(*status != U_STRING_NOT_TERMINATED_WARNING);
return bufLen;
}

Expand All @@ -933,6 +937,7 @@ uloc_setKeywordValue(const char* keywordName,
startSearchHere += keywordNameLen;
*startSearchHere++ = '=';
uprv_strcpy(startSearchHere, keywordValueBuffer);
U_ASSERT(*status != U_STRING_NOT_TERMINATED_WARNING);
return needLen;
} /* end shortcut - no @ */

Expand Down Expand Up @@ -1047,13 +1052,27 @@ uloc_setKeywordValue(const char* keywordName,
if (!handledInputKeyAndValue || U_FAILURE(*status)) {
/* if input key/value specified removal of a keyword not present in locale, or
* there was an error in CharString.append, leave original locale alone. */
U_ASSERT(*status != U_STRING_NOT_TERMINATED_WARNING);
return bufLen;
}

// needLen = length of the part before '@'
needLen = (int32_t)(startSearchHere - buffer);
return needLen + updatedKeysAndValues.extract(
// Check to see can we fit the startSearchHere, if not, return
// U_BUFFER_OVERFLOW_ERROR without copy updatedKeysAndValues into it.
// We do this because this API function does not behave like most others:
// It promises never to set a U_STRING_NOT_TERMINATED_WARNING.
// When the contents fits but without the terminating NUL, in this case we need to not change
// the buffer contents and return with a buffer overflow error.
int32_t appendLength = updatedKeysAndValues.length();
if (appendLength >= bufferCapacity - needLen) {
*status = U_BUFFER_OVERFLOW_ERROR;
return needLen + appendLength;
}
needLen += updatedKeysAndValues.extract(
startSearchHere, bufferCapacity - needLen, *status);
U_ASSERT(*status != U_STRING_NOT_TERMINATED_WARNING);
return needLen;
}

/* ### ID parsing implementation **************************************************/
Expand Down
5 changes: 5 additions & 0 deletions deps/icu-small/source/common/unicode/docmain.h
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,11 @@
* <td>icu::MessageFormat</td>
* </tr>
* <tr>
* <td>List Formatting</td>
* <td>ulistformatter.h</td>
* <td>icu::ListFormatter</td>
* </tr>
* <tr>
* <td>Number Formatting<br/>(includes currency and unit formatting)</td>
* <td>unumberformatter.h, unum.h</td>
* <td>icu::number::NumberFormatter (ICU 60+) or icu::NumberFormat (older versions)</td>
Expand Down
1 change: 1 addition & 0 deletions deps/icu-small/source/common/unicode/urename.h
Original file line number Diff line number Diff line change
Expand Up @@ -1137,6 +1137,7 @@
#define ulocimp_toLanguageTag U_ICU_ENTRY_POINT_RENAME(ulocimp_toLanguageTag)
#define ulocimp_toLegacyKey U_ICU_ENTRY_POINT_RENAME(ulocimp_toLegacyKey)
#define ulocimp_toLegacyType U_ICU_ENTRY_POINT_RENAME(ulocimp_toLegacyType)
#define ultag_getTKeyStart U_ICU_ENTRY_POINT_RENAME(ultag_getTKeyStart)
#define ultag_isExtensionSubtags U_ICU_ENTRY_POINT_RENAME(ultag_isExtensionSubtags)
#define ultag_isLanguageSubtag U_ICU_ENTRY_POINT_RENAME(ultag_isLanguageSubtag)
#define ultag_isPrivateuseValueSubtags U_ICU_ENTRY_POINT_RENAME(ultag_isPrivateuseValueSubtags)
Expand Down
6 changes: 3 additions & 3 deletions deps/icu-small/source/common/unicode/uvernum.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
* This value will change in the subsequent releases of ICU
* @stable ICU 2.6
*/
#define U_ICU_VERSION_MINOR_NUM 1
#define U_ICU_VERSION_MINOR_NUM 2

/** The current ICU patchlevel version as an integer.
* This value will change in the subsequent releases of ICU
Expand Down Expand Up @@ -139,7 +139,7 @@
* This value will change in the subsequent releases of ICU
* @stable ICU 2.4
*/
#define U_ICU_VERSION "68.1"
#define U_ICU_VERSION "68.2"

/**
* The current ICU library major version number as a string, for library name suffixes.
Expand All @@ -158,7 +158,7 @@
/** Data version in ICU4C.
* @internal ICU 4.4 Internal Use Only
**/
#define U_ICU_DATA_VERSION "68.1"
#define U_ICU_DATA_VERSION "68.2"
#endif /* U_HIDE_INTERNAL_API */

/*===========================================================================
Expand Down
Loading