Ignore:
Timestamp:
Apr 6, 2012, 3:35:55 PM (13 years ago)
Author:
[email protected]
Message:

Renamed

WeakHeap => WeakSet
HandleHeap => HandleSet

Reviewed by Sam Weinig.

These sets do have internal allocators, but it's confusing to call them
heaps because they're sub-objects of an object called "heap".

  • heap/HandleHeap.cpp: Removed.
  • heap/HandleHeap.h: Removed.
  • heap/HandleSet.cpp: Copied from JavaScriptCore/heap/HandleHeap.cpp.
  • heap/WeakHeap.cpp: Removed.
  • heap/WeakHeap.h: Removed.
  • heap/WeakSet.cpp: Copied from JavaScriptCore/heap/WeakHeap.cpp.
  • heap/WeakSet.h: Copied from JavaScriptCore/heap/WeakHeap.h.

Plus global rename using grep.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/runtime/WeakGCMap.h

    r113141 r113508  
    9090        map_iterator end = m_map.end();
    9191        for (map_iterator ptr = m_map.begin(); ptr != end; ++ptr)
    92             WeakHeap::deallocate(ptr->second);
     92            WeakSet::deallocate(ptr->second);
    9393        m_map.clear();
    9494    }
     
    109109        WeakImpl* impl = iter.m_iterator->second;
    110110        ASSERT(impl);
    111         WeakHeap::deallocate(impl);
     111        WeakSet::deallocate(impl);
    112112        m_map.remove(iter.m_iterator);
    113113    }
     
    122122        typename MapType::AddResult result = m_map.add(key, 0);
    123123        if (result.isNewEntry)
    124             result.iterator->second = globalData.heap.weakHeap()->allocate(value, this, FinalizerCallback::finalizerContextFor(key));
     124            result.iterator->second = globalData.heap.weakSet()->allocate(value, this, FinalizerCallback::finalizerContextFor(key));
    125125
    126126        // WeakGCMap exposes a different iterator, so we need to wrap it and create our own AddResult.
     
    132132        typename MapType::AddResult result = m_map.add(key, 0);
    133133        if (!result.isNewEntry)
    134             WeakHeap::deallocate(result.iterator->second);
    135         result.iterator->second = globalData.heap.weakHeap()->allocate(value, this, FinalizerCallback::finalizerContextFor(key));
     134            WeakSet::deallocate(result.iterator->second);
     135        result.iterator->second = globalData.heap.weakSet()->allocate(value, this, FinalizerCallback::finalizerContextFor(key));
    136136    }
    137137
     
    142142            return HashTraits<ExternalType>::emptyValue();
    143143        ExternalType result = HandleTypes<MappedType>::getFromSlot(const_cast<JSValue*>(&impl->jsValue()));
    144         WeakHeap::deallocate(impl);
     144        WeakSet::deallocate(impl);
    145145        return result;
    146146    }
     
    161161        WeakImpl* impl = m_map.take(FinalizerCallback::keyForFinalizer(context, HandleTypes<MappedType>::getFromSlot(handle.slot())));
    162162        ASSERT(impl);
    163         WeakHeap::deallocate(impl);
     163        WeakSet::deallocate(impl);
    164164    }
    165165
Note: See TracChangeset for help on using the changeset viewer.