Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid CompactPtr expansion if unnecessary
https://bugs.webkit.org/show_bug.cgi?id=249572 rdar://103506006 Reviewed by Justin Michaud. This patch adds operator== etc. for CompactPtr and adjust HashTraits for CompactPtr so that we can avoid pointer expansion while using CompactPtr in HashTable: comparison of CompactPtrs and hash computation don't need pointer expansion. * Source/WTF/wtf/CompactPtr.h: (WTF::CompactPtr::operator==): (WTF::CompactPtr::operator!=): (WTF::CompactPtr::storage const): (WTF::operator==): (WTF::operator!=): (WTF::DefaultHash<CompactPtr<P>>::hash): (WTF::DefaultHash<CompactPtr<P>>::equal): * Source/WTF/wtf/HashTraits.h: (WTF::HashTraits<CompactPtr<P>>::peek): * Source/WTF/wtf/Packed.h: (WTF::operator==): (WTF::operator!=): * Source/WTF/wtf/RefPtr.h: (WTF::operator==): (WTF::operator!=): * Source/WTF/wtf/text/AtomStringImpl.cpp: (WTF::AtomStringTableRemovalHashTranslator::equal): Canonical link: https://commits.webkit.org/258271@main
- Loading branch information
1 parent
95e3bdf
commit 36ff06c
Showing
5 changed files
with
102 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters