Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: f8fff5fe6aeb98af29bb80a3b9c4c6edf1577b87
      
https://github.com/WebKit/WebKit/commit/f8fff5fe6aeb98af29bb80a3b9c4c6edf1577b87
  Author: Chris Dumez <[email protected]>
  Date:   2025-05-01 (Thu, 01 May 2025)

  Changed paths:
    M Source/WTF/benchmarks/ToyLocks.h
    M Source/WTF/wtf/ASCIICType.h
    M Source/WTF/wtf/BloomFilter.h
    M Source/WTF/wtf/BumpPointerAllocator.h
    M Source/WTF/wtf/CheckedArithmetic.h
    M Source/WTF/wtf/CheckedPtr.h
    M Source/WTF/wtf/CountingLock.h
    M Source/WTF/wtf/DataLog.h
    M Source/WTF/wtf/Dominators.h
    M Source/WTF/wtf/FastBitVector.h
    M Source/WTF/wtf/FastMalloc.cpp
    M Source/WTF/wtf/FixedBitVector.h
    M Source/WTF/wtf/HashTraits.h
    M Source/WTF/wtf/JSONValues.cpp
    M Source/WTF/wtf/LazyRef.h
    M Source/WTF/wtf/LazyUniqueRef.h
    M Source/WTF/wtf/Lock.h
    M Source/WTF/wtf/LockAlgorithm.h
    M Source/WTF/wtf/MetaAllocator.cpp
    M Source/WTF/wtf/NativePromise.h
    M Source/WTF/wtf/PrintStream.cpp
    M Source/WTF/wtf/PriorityQueue.h
    M Source/WTF/wtf/PtrTag.h
    M Source/WTF/wtf/Ref.h
    M Source/WTF/wtf/RefTrackerMixin.h
    M Source/WTF/wtf/SequenceLocked.h
    M Source/WTF/wtf/SequesteredAllocator.h
    M Source/WTF/wtf/SequesteredImmortalHeap.h
    M Source/WTF/wtf/SequesteredMalloc.cpp
    M Source/WTF/wtf/SmallSet.h
    M Source/WTF/wtf/StackCheck.h
    M Source/WTF/wtf/ThreadSafeRefCounted.h
    M Source/WTF/wtf/ThreadSafeRefCountedWithSuppressingSaferCPPChecking.h
    M Source/WTF/wtf/ThreadSafeWeakPtr.h
    M Source/WTF/wtf/Threading.h
    M Source/WTF/wtf/URL.cpp
    M Source/WTF/wtf/URLParser.cpp
    M Source/WTF/wtf/ValueOrReference.h
    M Source/WTF/wtf/Vector.h
    M Source/WTF/wtf/WeakHashMap.h
    M Source/WTF/wtf/WeakListHashSet.h
    M Source/WTF/wtf/WordLock.h
    M Source/WTF/wtf/cf/URLCF.cpp
    M Source/WTF/wtf/darwin/OSLogPrintStream.mm
    M Source/WTF/wtf/glib/SocketConnection.cpp
    M Source/WTF/wtf/playstation/OSAllocatorPlayStation.cpp
    M Source/WTF/wtf/posix/OSAllocatorPOSIX.cpp
    M Source/WTF/wtf/text/AtomString.cpp
    M Source/WTF/wtf/text/StringBuilder.cpp
    M Source/WTF/wtf/text/StringBuilderInternals.h
    M Source/WTF/wtf/text/StringBuilderJSON.h
    M Source/WTF/wtf/text/StringHasherInlines.h
    M Source/WTF/wtf/text/StringImpl.cpp
    M Source/WTF/wtf/text/StringSearch.h
    M Source/WTF/wtf/text/StringToIntegerConversion.h
    M Source/WTF/wtf/text/StringView.cpp
    M Source/WTF/wtf/text/StringView.h
    M Source/WTF/wtf/text/WYHash.h
    M Source/WTF/wtf/win/OSAllocatorWin.cpp

  Log Message:
  -----------
  Start adopting C++20's [[likely]] / [[unlikely]] in WTF/
https://bugs.webkit.org/show_bug.cgi?id=292387

Reviewed by Yusuke Suzuki.

Start adopting C++20's [[likely]] / [[unlikely]] in WTF/. It is now part of the 
C++
language and has several benefits over our macros. In particular, those 
annotations
can be used for `switch` cases and `else` statements.

* Source/WTF/benchmarks/ToyLocks.h:
* Source/WTF/wtf/ASCIICType.h:
(WTF::isASCIIAlphaCaselessEqual):
* Source/WTF/wtf/BloomFilter.h:
(WTF::CountingBloomFilter<keyBits>::add):
(WTF::CountingBloomFilter<keyBits>::remove):
* Source/WTF/wtf/BumpPointerAllocator.h:
(WTF::BumpPointerPool::ensureCapacityCrossPool):
* Source/WTF/wtf/CheckedArithmetic.h:
(WTF::Checked::operator! const):
(WTF::Checked::operator bool const):
(WTF::Checked::operator T const):
(WTF::Checked::value const):
(WTF::operator+):
(WTF::operator-):
(WTF::operator*):
(WTF::operator/):
* Source/WTF/wtf/CheckedPtr.h:
(WTF::CheckedPtr::refIfNotNull):
(WTF::CheckedPtr::derefIfNotNull):
* Source/WTF/wtf/CountingLock.h:
* Source/WTF/wtf/DataLog.h:
* Source/WTF/wtf/Dominators.h:
(WTF::Dominators::Dominators):
* Source/WTF/wtf/FastBitVector.h:
(WTF::FastBitVector::operator=):
* Source/WTF/wtf/FastMalloc.cpp:
(WTF::fastAlignedMalloc):
* Source/WTF/wtf/FixedBitVector.h:
(WTF::FixedBitVector::concurrentTestAndSet):
(WTF::FixedBitVector::concurrentTestAndClear):
(WTF::FixedBitVector::testAndSet):
(WTF::FixedBitVector::testAndClear):
(WTF::FixedBitVector::test):
* Source/WTF/wtf/HashTraits.h:
* Source/WTF/wtf/JSONValues.cpp:
* Source/WTF/wtf/LazyRef.h:
(WTF::LazyRef::get):
* Source/WTF/wtf/LazyUniqueRef.h:
(WTF::LazyUniqueRef::get):
* Source/WTF/wtf/Lock.h:
* Source/WTF/wtf/LockAlgorithm.h:
(WTF::LockAlgorithm::lock):
(WTF::LockAlgorithm::unlock):
(WTF::LockAlgorithm::unlockFairly):
(WTF::LockAlgorithm::safepoint):
* Source/WTF/wtf/MetaAllocator.cpp:
(WTF::MetaAllocator::release):
(WTF::MetaAllocator::allocate):
* Source/WTF/wtf/NativePromise.h:
* Source/WTF/wtf/PrintStream.cpp:
(WTF::printExpectedCStringHelper):
* Source/WTF/wtf/PriorityQueue.h:
* Source/WTF/wtf/PtrTag.h:
* Source/WTF/wtf/Ref.h:
(WTF::DefaultRefDerefTraits::refIfNotNull):
(WTF::DefaultRefDerefTraits::derefIfNotNull):
* Source/WTF/wtf/RefTrackerMixin.h:
* Source/WTF/wtf/SequenceLocked.h:
(WTF::SequenceLocked::load const):
* Source/WTF/wtf/SequesteredAllocator.h:
* Source/WTF/wtf/SequesteredImmortalHeap.h:
(WTF::SequesteredImmortalAllocator::allocateImpl):
(WTF::SequesteredImmortalAllocator::alignedAllocateImpl):
* Source/WTF/wtf/SequesteredMalloc.cpp:
* Source/WTF/wtf/SmallSet.h:
* Source/WTF/wtf/StackCheck.h:
(WTF::StackCheck::Scope::Scope):
* Source/WTF/wtf/ThreadSafeRefCounted.h:
(WTF::ThreadSafeRefCountedBase::derefBaseWithoutDeletionCheck const):
* Source/WTF/wtf/ThreadSafeRefCountedWithSuppressingSaferCPPChecking.h:
(WTF::ThreadSafeRefCountedWithSuppressingSaferCPPCheckingBase::derefBaseWithoutDeletionCheck
 const):
* Source/WTF/wtf/ThreadSafeWeakPtr.h:
(WTF::ThreadSafeWeakPtrControlBlock::strongDeref const):
(WTF::ThreadSafeWeakPtrControlBlockRefDerefTraits::refIfNotNull):
(WTF::ThreadSafeWeakPtrControlBlockRefDerefTraits::derefIfNotNull):
(WTF::ThreadSafeRefCountedAndCanMakeThreadSafeWeakPtr::controlBlock const):
* Source/WTF/wtf/Threading.h:
(WTF::Thread::currentSingleton):
* Source/WTF/wtf/URL.cpp:
(WTF::percentEncodeCharacters):
* Source/WTF/wtf/URLParser.cpp:
(WTF::URLParser::advance):
(WTF::URLParser::appendToASCIIBuffer):
(WTF::URLParser::utf8PercentEncode):
(WTF::URLParser::utf8QueryEncode):
(WTF::URLParser::encodeNonUTF8Query):
(WTF::URLParser::parsedDataView):
(WTF::URLParser::currentPosition):
(WTF::URLParser::URLParser):
(WTF::URLParser::parse):
(WTF::URLParser::parseAuthority):
(WTF::URLParser::parseIPv4Piece):
(WTF::URLParser::parseIPv4Host):
(WTF::URLParser::parseIPv6Host):
(WTF::URLParser::domainToASCII):
(WTF::URLParser::parsePort):
(WTF::dnsNameEndsInNumber):
(WTF::URLParser::parseHostAndPort):
(WTF::URLParser::internationalDomainNameTranscoder):
* Source/WTF/wtf/ValueOrReference.h:
* Source/WTF/wtf/Vector.h:
(WTF::VectorBufferBase::allocateBuffer):
(WTF::Vector::removeLast):
(WTF::Malloc>::expandCapacity):
(WTF::Malloc>::growImpl):
(WTF::Malloc>::reserveCapacity):
(WTF::Malloc>::append):
(WTF::Malloc>::appendSlowCase):
(WTF::Malloc>::constructAndAppendSlowCase):
(WTF::insertInUniquedSortedVector):
* Source/WTF/wtf/WeakHashMap.h:
* Source/WTF/wtf/WeakListHashSet.h:
* Source/WTF/wtf/WordLock.h:
* Source/WTF/wtf/cf/URLCF.cpp:
(WTF::URL::createCFURL const):
* Source/WTF/wtf/darwin/OSLogPrintStream.mm:
(WTF::OSLogPrintStream::vprintf):
* Source/WTF/wtf/glib/SocketConnection.cpp:
(WTF::SocketConnection::sendMessage):
* Source/WTF/wtf/playstation/OSAllocatorPlayStation.cpp:
(WTF::OSAllocator::protect):
* Source/WTF/wtf/posix/OSAllocatorPOSIX.cpp:
(WTF::OSAllocator::protect):
* Source/WTF/wtf/text/AtomString.cpp:
(WTF::AtomString::convertASCIICase const):
(WTF::replaceUnpairedSurrogatesWithReplacementCharacter):
* Source/WTF/wtf/text/StringBuilder.cpp:
(WTF::StringBuilder::extendBufferForAppendingWithUpconvert):
* Source/WTF/wtf/text/StringBuilderInternals.h:
(WTF::StringBuilder::allocateBuffer):
(WTF::StringBuilder::reallocateBuffer):
(WTF::StringBuilder::extendBufferForAppendingSlowCase):
* Source/WTF/wtf/text/StringBuilderJSON.h:
(WTF::appendEscapedJSONStringContent):
* Source/WTF/wtf/text/StringHasherInlines.h:
(WTF::StringHasher::computeHashAndMaskTop8Bits):
(WTF::StringHasher::computeLiteralHashAndMaskTop8Bits):
* Source/WTF/wtf/text/StringImpl.cpp:
(WTF::StringImpl::convertToLowercaseWithoutLocale):
(WTF::StringImpl::convertToUppercaseWithoutLocale):
(WTF::StringImpl::convertToUppercaseWithoutLocaleStartingAtFailingIndex8Bit):
(WTF::StringImpl::foldCase):
(WTF::StringImpl::find):
* Source/WTF/wtf/text/StringSearch.h:
(WTF::BoyerMooreHorspoolTable::find const):
* Source/WTF/wtf/text/StringToIntegerConversion.h:
(WTF::parseInteger):
* Source/WTF/wtf/text/StringView.cpp:
(WTF::StringView::find const):
(WTF::convertASCIILowercaseAtom):
* Source/WTF/wtf/text/StringView.h:
(WTF::StringViewWithUnderlyingString::toString const):
(WTF::StringViewWithUnderlyingString::toAtomString const):
* Source/WTF/wtf/text/WYHash.h:
(WTF::WYHash::handleGreaterThan8CharactersCase):
(WTF::WYHash::hash):
* Source/WTF/wtf/win/OSAllocatorWin.cpp:
(WTF::OSAllocator::protect):

Canonical link: https://commits.webkit.org/294408@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to