Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 36ff06c62fdb1c3f88d3360e6833bb2e840b0480
      
https://github.com/WebKit/WebKit/commit/36ff06c62fdb1c3f88d3360e6833bb2e840b0480
  Author: Yusuke Suzuki <[email protected]>
  Date:   2022-12-22 (Thu, 22 Dec 2022)

  Changed paths:
    M Source/WTF/wtf/CompactPtr.h
    M Source/WTF/wtf/HashTraits.h
    M Source/WTF/wtf/Packed.h
    M Source/WTF/wtf/RefPtr.h
    M Source/WTF/wtf/text/AtomStringImpl.cpp

  Log Message:
  -----------
  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


_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to