Ignore:
Timestamp:
Apr 28, 2008, 10:18:15 AM (17 years ago)
Author:
Darin Adler
Message:

2008-04-28 Darin Adler <Darin Adler>

Reviewed by Adam.

  • make sure RefPtr's default hash doesn't ref/deref when computing the hash
  • remove remnants of the hash table storage type optimization
  • wtf/HashFunctions.h: Used "using" to get the hash and equal functions from PtrHash<P*> into PtrHash<RefPtr<P>>.
  • wtf/HashMap.h: Replaced uses of PairBaseHashTraits with PairHashTraits. Eliminated storage-related typedefs. Removed constructor, destructor, copy constructor, and destructor since the compiler-generated ones are fine. Removed refAll and derefAll. Took out unnnecessary typecasts. Removed use of RefCounter.
  • wtf/HashSet.h: Eliminated storage-related typedefs. Removed constructor, destructor, copy constructor, and destructor since the compiler-generated ones are fine. Removed refAll and derefAll. Removed unneeded template arguents from HashSetTranslatorAdapter. Eliminated unneeded HashSetTranslator template.
  • wtf/HashTable.h: Tweaked formatting. Removed NeedsRef, RefCounterBase, RefCounter, HashTableRefCounterBase, HashTableRefCounter, and Assigner class templates.
  • wtf/HashTraits.h: Removed StorageTraits, needsRef, PairBaseHashTraits, and HashKeyStorageTraits.
  • wtf/RefPtrHashMap.h: Made all the same fixes as in HashMap. Also made the corresponding changes to RefPtrHashMapRawKeyTranslator.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/wtf/HashFunctions.h

    r32611 r32650  
    118118    };
    119119    template<typename P> struct PtrHash<RefPtr<P> > : PtrHash<P*> {
    120         static unsigned hash(const RefPtr<P>& key) { return PtrHash<P*>::hash(key.get()); }
     120        using PtrHash<P*>::hash;
     121        static unsigned hash(const RefPtr<P>& key) { return hash(key.get()); }
     122        using PtrHash<P*>::equal;
    121123        static bool equal(const RefPtr<P>& a, const RefPtr<P>& b) { return a == b; }
    122124        static bool equal(P* a, const RefPtr<P>& b) { return a == b; }
Note: See TracChangeset for help on using the changeset viewer.