Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion deps/icu-small/LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ UNICODE LICENSE V3

COPYRIGHT AND PERMISSION NOTICE

Copyright © 2016-2025 Unicode, Inc.
Copyright © 1991-2026 Unicode, Inc.

NOTICE TO USER: Carefully read the following legal agreement. BY
DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING DATA FILES, AND/OR
Expand Down
4 changes: 2 additions & 2 deletions deps/icu-small/README-FULL-ICU.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
ICU sources - auto generated by shrink-icu-src.py

This directory contains the ICU subset used by --with-intl=full-icu
It is a strict subset of ICU 78 source files with the following exception(s):
* deps/icu-small/source/data/in/icudt78l.dat.bz2 : compressed data file
It is a strict subset of ICU 79 source files with the following exception(s):
* deps/icu-small/source/data/in/icudt79l.dat.bz2 : compressed data file


To rebuild this directory, see ../../tools/icu/README.md
Expand Down
2 changes: 1 addition & 1 deletion deps/icu-small/source/.clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Language: Cpp
BasedOnStyle: LLVM
IndentWidth: 4
ColumnLimit: 105
ColumnLimit: 100
AllowShortBlocksOnASingleLine: false
AllowShortIfStatementsOnASingleLine: true
...
3 changes: 3 additions & 0 deletions deps/icu-small/source/common/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ cc_library(
# Bazel workspace:
# https://stackoverflow.com/a/65635893/2077918
includes = ["."],
defines = [
"U_DEBUG", # enable U_ASSERT()
],
local_defines = [
"U_COMMON_IMPLEMENTATION",
],
Expand Down
7 changes: 4 additions & 3 deletions deps/icu-small/source/common/appendable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,12 @@ Appendable::reserveAppendCapacity(int32_t /*appendCapacity*/) {
return true;
}

char16_t *
char16_t*
Appendable::getAppendBuffer(int32_t minCapacity,
int32_t /*desiredCapacityHint*/,
char16_t *scratch, int32_t scratchCapacity,
int32_t *resultCapacity) {
char16_t* scratch U_LIFETIME_BOUND,
int32_t scratchCapacity,
int32_t* resultCapacity) U_LIFETIME_BOUND {
if(minCapacity<1 || scratchCapacity<minCapacity) {
*resultCapacity=0;
return nullptr;
Expand Down
6 changes: 3 additions & 3 deletions deps/icu-small/source/common/brkiter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ BreakIterator::BreakIterator(const BreakIterator &other)
requestLocale(other.requestLocale) {
}

BreakIterator &BreakIterator::operator =(const BreakIterator &other) {
BreakIterator& BreakIterator::operator=(const BreakIterator& other) U_LIFETIME_BOUND {
if (this != &other) {
actualLocale = other.actualLocale;
validLocale = other.validLocale;
Expand Down Expand Up @@ -504,8 +504,8 @@ BreakIterator::getLocale(ULocDataLocaleType type, UErrorCode& status) const {
return LocaleBased::getLocale(validLocale, actualLocale, type, status);
}

const char *
BreakIterator::getLocaleID(ULocDataLocaleType type, UErrorCode& status) const {
const char*
BreakIterator::getLocaleID(ULocDataLocaleType type, UErrorCode& status) const U_LIFETIME_BOUND {
if (U_FAILURE(status)) {
return nullptr;
}
Expand Down
4 changes: 2 additions & 2 deletions deps/icu-small/source/common/bytesinkutil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,9 @@ CharStringByteSink::Append(const char* bytes, int32_t n) {
char*
CharStringByteSink::GetAppendBuffer(int32_t min_capacity,
int32_t desired_capacity_hint,
char* scratch,
char* scratch U_LIFETIME_BOUND,
int32_t scratch_capacity,
int32_t* result_capacity) {
int32_t* result_capacity) U_LIFETIME_BOUND {
if (min_capacity < 1 || scratch_capacity < min_capacity) {
*result_capacity = 0;
return nullptr;
Expand Down
4 changes: 2 additions & 2 deletions deps/icu-small/source/common/bytesinkutil.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ class U_COMMON_API CharStringByteSink : public ByteSink {

char* GetAppendBuffer(int32_t min_capacity,
int32_t desired_capacity_hint,
char* scratch,
char* scratch U_LIFETIME_BOUND,
int32_t scratch_capacity,
int32_t* result_capacity) override;
int32_t* result_capacity) U_LIFETIME_BOUND override;

private:
CharString& dest_;
Expand Down
11 changes: 6 additions & 5 deletions deps/icu-small/source/common/bytestream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ ByteSink::~ByteSink() {}

char* ByteSink::GetAppendBuffer(int32_t min_capacity,
int32_t /*desired_capacity_hint*/,
char* scratch, int32_t scratch_capacity,
int32_t* result_capacity) {
char* scratch U_LIFETIME_BOUND,
int32_t scratch_capacity,
int32_t* result_capacity) U_LIFETIME_BOUND {
if (min_capacity < 1 || scratch_capacity < min_capacity) {
*result_capacity = 0;
return nullptr;
Expand All @@ -35,7 +36,7 @@ CheckedArrayByteSink::CheckedArrayByteSink(char* outbuf, int32_t capacity)

CheckedArrayByteSink::~CheckedArrayByteSink() {}

CheckedArrayByteSink& CheckedArrayByteSink::Reset() {
CheckedArrayByteSink& CheckedArrayByteSink::Reset() U_LIFETIME_BOUND {
size_ = appended_ = 0;
overflowed_ = false;
return *this;
Expand Down Expand Up @@ -65,9 +66,9 @@ void CheckedArrayByteSink::Append(const char* bytes, int32_t n) {

char* CheckedArrayByteSink::GetAppendBuffer(int32_t min_capacity,
int32_t /*desired_capacity_hint*/,
char* scratch,
char* scratch U_LIFETIME_BOUND,
int32_t scratch_capacity,
int32_t* result_capacity) {
int32_t* result_capacity) U_LIFETIME_BOUND {
if (min_capacity < 1 || scratch_capacity < min_capacity) {
*result_capacity = 0;
return nullptr;
Expand Down
12 changes: 7 additions & 5 deletions deps/icu-small/source/common/bytestrie.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ BytesTrie::readValue(const uint8_t *pos, int32_t leadByte) {
return value;
}

const uint8_t *
BytesTrie::jumpByDelta(const uint8_t *pos) {
const uint8_t*
BytesTrie::jumpByDelta(const uint8_t* pos U_LIFETIME_BOUND) {
int32_t delta=*pos++;
if(delta<kMinTwoByteDeltaLead) {
// nothing to do
Expand Down Expand Up @@ -312,9 +312,11 @@ BytesTrie::next(const char *s, int32_t sLength) {
}
}

const uint8_t *
BytesTrie::findUniqueValueFromBranch(const uint8_t *pos, int32_t length,
UBool haveUniqueValue, int32_t &uniqueValue) {
const uint8_t*
BytesTrie::findUniqueValueFromBranch(const uint8_t* pos U_LIFETIME_BOUND,
int32_t length,
UBool haveUniqueValue,
int32_t& uniqueValue) {
while(length>kMaxBranchLinearSubNodeLength) {
++pos; // ignore the comparison byte
if(nullptr==findUniqueValueFromBranch(jumpByDelta(pos), length>>1, haveUniqueValue, uniqueValue)) {
Expand Down
15 changes: 8 additions & 7 deletions deps/icu-small/source/common/bytestriebuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class BytesTrieElement : public UMemory {

void setTo(StringPiece s, int32_t val, CharString &strings, UErrorCode &errorCode);

StringPiece getString(const CharString &strings) const {
StringPiece getString(const CharString& strings U_LIFETIME_BOUND) const {
int32_t offset=stringOffset;
int32_t length;
if(offset>=0) {
Expand Down Expand Up @@ -68,7 +68,7 @@ class BytesTrieElement : public UMemory {
int32_t compareStringTo(const BytesTrieElement &o, const CharString &strings) const;

private:
const char *data(const CharString &strings) const {
const char* data(const CharString& strings U_LIFETIME_BOUND) const {
int32_t offset=stringOffset;
if(offset>=0) {
++offset;
Expand Down Expand Up @@ -144,8 +144,8 @@ BytesTrieBuilder::~BytesTrieBuilder() {
uprv_free(bytes);
}

BytesTrieBuilder &
BytesTrieBuilder::add(StringPiece s, int32_t value, UErrorCode &errorCode) {
BytesTrieBuilder&
BytesTrieBuilder::add(StringPiece s, int32_t value, UErrorCode& errorCode) U_LIFETIME_BOUND {
if(U_FAILURE(errorCode)) {
return *this;
}
Expand Down Expand Up @@ -206,7 +206,8 @@ BytesTrieBuilder::build(UStringTrieBuildOption buildOption, UErrorCode &errorCod
}

StringPiece
BytesTrieBuilder::buildStringPiece(UStringTrieBuildOption buildOption, UErrorCode &errorCode) {
BytesTrieBuilder::buildStringPiece(UStringTrieBuildOption buildOption,
UErrorCode& errorCode) U_LIFETIME_BOUND {
buildBytes(buildOption, errorCode);
StringPiece result;
if(U_SUCCESS(errorCode)) {
Expand Down Expand Up @@ -269,8 +270,8 @@ BytesTrieBuilder::buildBytes(UStringTrieBuildOption buildOption, UErrorCode &err
}
}

BytesTrieBuilder &
BytesTrieBuilder::clear() {
BytesTrieBuilder&
BytesTrieBuilder::clear() U_LIFETIME_BOUND {
strings->clear();
elementsLength=0;
bytesLength=0;
Expand Down
17 changes: 10 additions & 7 deletions deps/icu-small/source/common/bytestrieiterator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@

U_NAMESPACE_BEGIN

BytesTrie::Iterator::Iterator(const void *trieBytes, int32_t maxStringLength,
UErrorCode &errorCode)
BytesTrie::Iterator::Iterator(const void* trieBytes U_LIFETIME_BOUND,
int32_t maxStringLength,
UErrorCode& errorCode)
: bytes_(static_cast<const uint8_t *>(trieBytes)),
pos_(bytes_), initialPos_(bytes_),
remainingMatchLength_(-1), initialRemainingMatchLength_(-1),
Expand Down Expand Up @@ -80,8 +81,8 @@ BytesTrie::Iterator::~Iterator() {
delete stack_;
}

BytesTrie::Iterator &
BytesTrie::Iterator::reset() {
BytesTrie::Iterator&
BytesTrie::Iterator::reset() U_LIFETIME_BOUND {
pos_=initialPos_;
remainingMatchLength_=initialRemainingMatchLength_;
int32_t length=remainingMatchLength_+1; // Remaining match length.
Expand Down Expand Up @@ -169,7 +170,7 @@ BytesTrie::Iterator::next(UErrorCode &errorCode) {
}

StringPiece
BytesTrie::Iterator::getString() const {
BytesTrie::Iterator::getString() const U_LIFETIME_BOUND {
return str_ == nullptr ? StringPiece() : str_->toStringPiece();
}

Expand All @@ -181,8 +182,10 @@ BytesTrie::Iterator::truncateAndStop() {
}

// Branch node, needs to take the first outbound edge and push state for the rest.
const uint8_t *
BytesTrie::Iterator::branchNext(const uint8_t *pos, int32_t length, UErrorCode &errorCode) {
const uint8_t*
BytesTrie::Iterator::branchNext(const uint8_t* pos U_LIFETIME_BOUND,
int32_t length,
UErrorCode& errorCode) {
while(length>kMaxBranchLinearSubNodeLength) {
++pos; // ignore the comparison byte
// Push state for the greater-or-equal edge.
Expand Down
13 changes: 10 additions & 3 deletions deps/icu-small/source/common/caniter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -440,8 +440,10 @@ UnicodeString* CanonicalIterator::getEquivalents(const UnicodeString &segment, i
return finalResult;
}

Hashtable *CanonicalIterator::getEquivalents2(Hashtable *fillinResult, const char16_t *segment, int32_t segLen, UErrorCode &status) {

Hashtable* CanonicalIterator::getEquivalents2(Hashtable* fillinResult U_LIFETIME_BOUND,
const char16_t* segment,
int32_t segLen,
UErrorCode& status) {
if (U_FAILURE(status)) {
return nullptr;
}
Expand Down Expand Up @@ -518,7 +520,12 @@ Hashtable *CanonicalIterator::getEquivalents2(Hashtable *fillinResult, const cha
* (with canonical rearrangement!)
* If so, take the remainder, and return the equivalents
*/
Hashtable *CanonicalIterator::extract(Hashtable *fillinResult, UChar32 comp, const char16_t *segment, int32_t segLen, int32_t segmentPos, UErrorCode &status) {
Hashtable* CanonicalIterator::extract(Hashtable* fillinResult U_LIFETIME_BOUND,
UChar32 comp,
const char16_t* segment,
int32_t segLen,
int32_t segmentPos,
UErrorCode& status) {
//Hashtable *CanonicalIterator::extract(UChar32 comp, const UnicodeString &segment, int32_t segLen, int32_t segmentPos, UErrorCode &status) {
//if (PROGRESS) printf(" extract: %s, ", UToS(Tr(UnicodeString(comp))));
//if (PROGRESS) printf("%s, %i\n", UToS(Tr(segment)), segmentPos);
Expand Down
4 changes: 2 additions & 2 deletions deps/icu-small/source/common/chariter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ textLength(that.textLength), pos(that.pos), begin(that.begin), end(that.end)
{
}

CharacterIterator &
CharacterIterator::operator=(const CharacterIterator &that) {
CharacterIterator&
CharacterIterator::operator=(const CharacterIterator& that) U_LIFETIME_BOUND {
ForwardCharacterIterator::operator=(that);
textLength = that.textLength;
pos = that.pos;
Expand Down
Loading
Loading