Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 850b4c3e0580b1f652556dcb764b1a956a189832
https://github.com/WebKit/WebKit/commit/850b4c3e0580b1f652556dcb764b1a956a189832
Author: Marcus Plutowski <[email protected]>
Date: 2025-03-16 (Sun, 16 Mar 2025)
Changed paths:
M Source/WTF/wtf/Forward.h
M Source/WTF/wtf/HashMap.h
M Source/WTF/wtf/HashSet.h
M Source/WTF/wtf/HashTable.h
M Source/WTF/wtf/RobinHoodHashTable.h
Log Message:
-----------
[WTF] Parameterize backing allocators for HashTable/HashMap/RobinHoodHashTable
rdar://147083892
https://bugs.webkit.org/show_bug.cgi?id=289836
Reviewed by Keith Miller.
This allows us to pass in an allocator a la Vector/SegmentedVector,
which up until now has not been possible. This does not change the
actual allocator used when allocating the structure itself.
* Source/WTF/wtf/Forward.h:
* Source/WTF/wtf/HashMap.h:
(WTF::M>::swap):
(WTF::M>::size const):
(WTF::M>::capacity const):
(WTF::M>::byteSize const):
(WTF::M>::isEmpty const):
(WTF::M>::begin):
(WTF::M>::end):
(WTF::M>::begin const):
(WTF::M>::end const):
(WTF::M>::find):
(WTF::M>::find const):
(WTF::M>::contains const):
(WTF::M>::get const):
(WTF::M>::inlineGet const):
(WTF::M>::remove):
(WTF::M>::inlineSet):
(WTF::M>::inlineAdd):
(WTF::M>::inlineEnsure):
(WTF::M>::set):
(WTF::M>::ensure):
(WTF::M>::add):
(WTF::M>::fastAdd):
(WTF::M>::getOptional const):
(WTF::M>::removeIf):
(WTF::M>::clear):
(WTF::M>::take):
(WTF::M>::takeOptional):
(WTF::M>::takeFirst):
(WTF::M>::checkConsistency const):
(WTF::M>::isValidKey):
(WTF::operator==):
(WTF::shouldValidateKey>::swap): Deleted.
(WTF::shouldValidateKey>::size const): Deleted.
(WTF::shouldValidateKey>::capacity const): Deleted.
(WTF::shouldValidateKey>::byteSize const): Deleted.
(WTF::shouldValidateKey>::isEmpty const): Deleted.
(WTF::shouldValidateKey>::begin): Deleted.
(WTF::shouldValidateKey>::end): Deleted.
(WTF::shouldValidateKey>::begin const): Deleted.
(WTF::shouldValidateKey>::end const): Deleted.
(WTF::shouldValidateKey>::find): Deleted.
(WTF::shouldValidateKey>::find const): Deleted.
(WTF::shouldValidateKey>::contains const): Deleted.
(WTF::shouldValidateKey>::get const): Deleted.
(WTF::shouldValidateKey>::inlineGet const): Deleted.
(WTF::shouldValidateKey>::remove): Deleted.
(WTF::shouldValidateKey>::inlineSet): Deleted.
(WTF::shouldValidateKey>::inlineAdd): Deleted.
(WTF::shouldValidateKey>::inlineEnsure): Deleted.
(WTF::shouldValidateKey>::set): Deleted.
(WTF::shouldValidateKey>::ensure): Deleted.
(WTF::shouldValidateKey>::add): Deleted.
(WTF::shouldValidateKey>::fastAdd): Deleted.
(WTF::shouldValidateKey>::getOptional const): Deleted.
(WTF::shouldValidateKey>::removeIf): Deleted.
(WTF::shouldValidateKey>::clear): Deleted.
(WTF::shouldValidateKey>::take): Deleted.
(WTF::shouldValidateKey>::takeOptional): Deleted.
(WTF::shouldValidateKey>::takeFirst): Deleted.
(WTF::shouldValidateKey>::checkConsistency const): Deleted.
(WTF::shouldValidateKey>::isValidKey): Deleted.
* Source/WTF/wtf/HashSet.h:
* Source/WTF/wtf/HashTable.h:
(WTF::Malloc>::HashTable):
(WTF::Malloc>::checkKey):
(WTF::Malloc>::lookup):
(WTF::Malloc>::inlineLookup):
(WTF::Malloc>::lookupForReinsert):
(WTF::Malloc>::fullLookupForWriting):
(WTF::Malloc>::addUniqueForInitialization):
(WTF::Malloc>::initializeBucket):
(WTF::Malloc>::add):
(WTF::Malloc>::addPassingHashCode):
(WTF::Malloc>::reinsert):
(WTF::Malloc>::find):
(WTF::Malloc>::find const):
(WTF::Malloc>::contains const):
(WTF::Malloc>::removeAndInvalidateWithoutEntryConsistencyCheck):
(WTF::Malloc>::removeAndInvalidate):
(WTF::Malloc>::remove):
(WTF::Malloc>::removeWithoutEntryConsistencyCheck):
(WTF::Malloc>::removeIf):
(WTF::Malloc>::takeIf):
(WTF::Malloc>::allocateTable):
(WTF::Malloc>::deallocateTable):
(WTF::Malloc>::expand):
(WTF::Malloc>::computeBestTableSize):
(WTF::Malloc>::shrinkToBestSize):
(WTF::Malloc>::deleteReleasedWeakBuckets):
(WTF::Malloc>::rehash):
(WTF::Malloc>::clear):
(WTF::Malloc>::swap):
(WTF::=):
(WTF::Malloc>::checkTableConsistency const):
(WTF::Malloc>::checkTableConsistencyExceptSize const):
(WTF::shouldValidateKey>::HashTable): Deleted.
(WTF::shouldValidateKey>::checkKey): Deleted.
(WTF::shouldValidateKey>::lookup): Deleted.
(WTF::shouldValidateKey>::inlineLookup): Deleted.
(WTF::shouldValidateKey>::lookupForReinsert): Deleted.
(WTF::shouldValidateKey>::fullLookupForWriting): Deleted.
(WTF::shouldValidateKey>::addUniqueForInitialization): Deleted.
(WTF::shouldValidateKey>::initializeBucket): Deleted.
(WTF::shouldValidateKey>::add): Deleted.
(WTF::shouldValidateKey>::addPassingHashCode): Deleted.
(WTF::shouldValidateKey>::reinsert): Deleted.
(WTF::shouldValidateKey>::find): Deleted.
(WTF::shouldValidateKey>::find const): Deleted.
(WTF::shouldValidateKey>::contains const): Deleted.
(WTF::shouldValidateKey>::removeAndInvalidateWithoutEntryConsistencyCheck):
Deleted.
(WTF::shouldValidateKey>::removeAndInvalidate): Deleted.
(WTF::shouldValidateKey>::remove): Deleted.
(WTF::shouldValidateKey>::removeWithoutEntryConsistencyCheck): Deleted.
(WTF::shouldValidateKey>::removeIf): Deleted.
(WTF::shouldValidateKey>::takeIf): Deleted.
(WTF::shouldValidateKey>::allocateTable): Deleted.
(WTF::shouldValidateKey>::deallocateTable): Deleted.
(WTF::shouldValidateKey>::expand): Deleted.
(WTF::shouldValidateKey>::computeBestTableSize): Deleted.
(WTF::shouldValidateKey>::shrinkToBestSize): Deleted.
(WTF::shouldValidateKey>::deleteReleasedWeakBuckets): Deleted.
(WTF::shouldValidateKey>::rehash): Deleted.
(WTF::shouldValidateKey>::clear): Deleted.
(WTF::shouldValidateKey>::swap): Deleted.
(WTF::shouldValidateKey>::checkTableConsistency const): Deleted.
(WTF::shouldValidateKey>::checkTableConsistencyExceptSize const): Deleted.
* Source/WTF/wtf/RobinHoodHashTable.h:
(WTF::Malloc>::checkKey):
(WTF::Malloc>::lookup):
(WTF::Malloc>::inlineLookup):
(WTF::Malloc>::initializeBucket):
(WTF::Malloc>::add):
(WTF::Malloc>::maintainProbeDistanceForAdd):
(WTF::Malloc>::addPassingHashCode):
(WTF::Malloc>::reinsert):
(WTF::Malloc>::find):
(WTF::Malloc>::find const):
(WTF::Malloc>::contains const):
(WTF::Malloc>::removeAndInvalidateWithoutEntryConsistencyCheck):
(WTF::Malloc>::removeAndInvalidate):
(WTF::Malloc>::remove):
(WTF::Malloc>::removeWithoutEntryConsistencyCheck):
(WTF::Malloc>::allocateTable):
(WTF::Malloc>::deallocateTable):
(WTF::Malloc>::expand):
(WTF::Malloc>::computeBestTableSize):
(WTF::Malloc>::shrinkToBestSize):
(WTF::Malloc>::rehash):
(WTF::Malloc>::clear):
(WTF::Malloc>::RobinHoodHashTable):
(WTF::Malloc>::swap):
(WTF::=):
(WTF::Malloc>::checkTableConsistency const):
(WTF::Malloc>::checkTableConsistencyExceptSize const):
(WTF::shouldValidateKey>::checkKey): Deleted.
(WTF::shouldValidateKey>::lookup): Deleted.
(WTF::shouldValidateKey>::inlineLookup): Deleted.
(WTF::shouldValidateKey>::initializeBucket): Deleted.
(WTF::shouldValidateKey>::add): Deleted.
(WTF::shouldValidateKey>::maintainProbeDistanceForAdd): Deleted.
(WTF::shouldValidateKey>::addPassingHashCode): Deleted.
(WTF::shouldValidateKey>::reinsert): Deleted.
(WTF::shouldValidateKey>::find): Deleted.
(WTF::shouldValidateKey>::find const): Deleted.
(WTF::shouldValidateKey>::contains const): Deleted.
(WTF::shouldValidateKey>::removeAndInvalidateWithoutEntryConsistencyCheck):
Deleted.
(WTF::shouldValidateKey>::removeAndInvalidate): Deleted.
(WTF::shouldValidateKey>::remove): Deleted.
(WTF::shouldValidateKey>::removeWithoutEntryConsistencyCheck): Deleted.
(WTF::shouldValidateKey>::allocateTable): Deleted.
(WTF::shouldValidateKey>::deallocateTable): Deleted.
(WTF::shouldValidateKey>::expand): Deleted.
(WTF::shouldValidateKey>::computeBestTableSize): Deleted.
(WTF::shouldValidateKey>::shrinkToBestSize): Deleted.
(WTF::shouldValidateKey>::rehash): Deleted.
(WTF::shouldValidateKey>::clear): Deleted.
(WTF::shouldValidateKey>::RobinHoodHashTable): Deleted.
(WTF::shouldValidateKey>::swap): Deleted.
(WTF::shouldValidateKey>::checkTableConsistency const): Deleted.
(WTF::shouldValidateKey>::checkTableConsistencyExceptSize const): Deleted.
Canonical link: https://commits.webkit.org/292241@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