mHead.mPrev->mNext = entry; entry->mPrev = mHead.mPrev; entry->mNext = &mHead; mHead.mPrev = entry;
ClusterEntry* entry = NS_REINTERPRET_CAST(ClusterEntry*, he);      entry->mHashEntry.key   = &entry->mKey; entry->mHashEntry.value = &entry->mMatchSet;  set = &entry->mMatchSet; }  if (! set->Contains(*aMatch)) { set->Add(mPool, aMatch); } }    { MemoryElementSet::ConstIterator last = aMatch->mInstantiation.mSupport.Last(); for (MemoryElementSet::ConstIterator element = aMatch->mInstantiation.mSupport.First(); element != last; ++element) { PLHashNumber hash = element->Hash(); PLHashEntry** hep = PL_HashTableRawLookup(mSupport, hash, element.operator->());  MatchSet* set;  if (hep && *hep) { set = NS_STATIC_CAST(MatchSet*, (*hep)->value); } else { PLHashEntry* he = PL_HashTableRawAdd(mSupport, hep, hash, element.operator->(), nsnull);  SupportEntry* entry = NS_REINTERPRET_CAST(SupportEntry*, he); if (! entry) return NS_ERROR_OUT_OF_MEMORY;   entry->mHashEntry.key   = entry->mElement; entry->mHashEntry.value = &entry->mMatchSet;  set = &entry->mMatchSet; }  if (! set->Contains(*aMatch)) { set->Add(mPool, aMatch); } } }   ResourceSet::ConstIterator last = aMatch->mBindingDependencies.Last(); for (ResourceSet::ConstIterator dep = aMatch->mBindingDependencies.First(); dep != last; ++dep) AddBindingDependency(aMatch, *dep);
ClusterKeySet::Add(const ClusterKey& aKey){    PLHashNumber hash = aKey.Hash();    PLHashEntry** hep = PL_HashTableRawLookup(mTable, hash, &aKey);    if (hep && *hep)        return NS_OK; // already had it.    PLHashEntry* he = PL_HashTableRawAdd(mTable, hep, hash, &aKey, nsnull);    if (! he)        return NS_ERROR_OUT_OF_MEMORY;    Entry* entry = NS_REINTERPRET_CAST(Entry*, he);    // XXX yes, I am evil. Fixup the key in the hashentry to point to    // the value it contains, rather than the one on the stack.    entry->mHashEntry.key = &entry->mKey;    // thread    mHead.mPrev->mNext = entry;    entry->mPrev = mHead.mPrev;    entry->mNext = &mHead;    mHead.mPrev = entry;        return NS_OK;}