Ignore:
Timestamp:
Mar 13, 2011, 9:56:46 PM (14 years ago)
Author:
[email protected]
Message:

A few Heap-related renames (sans file moves, which should come next)
https://bugs.webkit.org/show_bug.cgi?id=56283

Reviewed by Sam Weinig.

ConservativeSet => ConservativeRoots. "Set" was misleading, since items
are not uniqued. Also, "Roots" is more specific about what's in the set.

MachineStackMarker => MachineThreads. "Threads" is more descriptive of
the fact that this class maintains a set of all threads using JSC.
"Stack" was misleading, since this class traverses stacks and registers.
"Mark" was misleading, since this class doesn't mark anything anymore.

registerThread => addCurrentThread. "Current" is more specific.
unregisterThread => removeCurrentThread. "Current" is more specific.

"currentThreadRegistrar" => threadSpecific. The only point of this data
structure is to register a thread-specific destructor with a pointer to
this.

"mark...Conservatively" => "gather". "Mark" is not true, since these
functions don't mark anything. "Conservatively" is redundant, since they
take "ConservativeRoots" as an argument.

  • API/APIShims.h:

(JSC::APIEntryShimWithoutLock::APIEntryShimWithoutLock):

(JSC::ConservativeRoots::grow):
(JSC::ConservativeRoots::add):

  • runtime/ConservativeSet.h:

(JSC::ConservativeRoots::ConservativeRoots):
(JSC::ConservativeRoots::~ConservativeRoots):
(JSC::ConservativeRoots::size):
(JSC::ConservativeRoots::roots):

  • runtime/Heap.cpp:

(JSC::Heap::Heap):
(JSC::Heap::markRoots):

  • runtime/Heap.h:

(JSC::Heap::machineThreads):

  • runtime/JSGlobalData.h:

(JSC::JSGlobalData::makeUsableFromMultipleThreads):

  • runtime/MachineStackMarker.cpp:

(JSC::MachineThreads::MachineThreads):
(JSC::MachineThreads::~MachineThreads):
(JSC::MachineThreads::makeUsableFromMultipleThreads):
(JSC::MachineThreads::addCurrentThread):
(JSC::MachineThreads::removeThread):
(JSC::MachineThreads::removeCurrentThread):
(JSC::MachineThreads::gatherFromCurrentThreadInternal):
(JSC::MachineThreads::gatherFromCurrentThread):
(JSC::MachineThreads::gatherFromOtherThread):
(JSC::MachineThreads::gatherConservativeRoots):

  • runtime/MachineStackMarker.h:
  • runtime/MarkStack.h:

(JSC::MarkStack::append):

File:
1 edited

Legend:

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

    r80985 r80995  
    2424 */
    2525
    26 #ifndef ConservativeSet_h
    27 #define ConservativeSet_h
     26#ifndef ConservativeRoots_h
     27#define ConservativeRoots_h
    2828
    2929#include <wtf/OSAllocator.h>
     
    3737// May contain duplicates.
    3838
    39 class ConservativeSet {
     39class ConservativeRoots {
    4040public:
    41     ConservativeSet(Heap*);
    42     ~ConservativeSet();
     41    ConservativeRoots(Heap*);
     42    ~ConservativeRoots();
    4343
    4444    void add(void* begin, void* end);
    4545   
    4646    size_t size();
    47     JSCell** set();
     47    JSCell** roots();
    4848
    4949private:
     
    5454
    5555    Heap* m_heap;
    56     JSCell** m_set;
     56    JSCell** m_roots;
    5757    size_t m_size;
    5858    size_t m_capacity;
    59     JSCell* m_inlineSet[inlineCapacity];
     59    JSCell* m_inlineRoots[inlineCapacity];
    6060};
    6161
    62 inline ConservativeSet::ConservativeSet(Heap* heap)
     62inline ConservativeRoots::ConservativeRoots(Heap* heap)
    6363    : m_heap(heap)
    64     , m_set(m_inlineSet)
     64    , m_roots(m_inlineRoots)
    6565    , m_size(0)
    6666    , m_capacity(inlineCapacity)
     
    6868}
    6969
    70 inline ConservativeSet::~ConservativeSet()
     70inline ConservativeRoots::~ConservativeRoots()
    7171{
    72     if (m_set != m_inlineSet)
    73         OSAllocator::decommitAndRelease(m_set, m_capacity * sizeof(JSCell*));
     72    if (m_roots != m_inlineRoots)
     73        OSAllocator::decommitAndRelease(m_roots, m_capacity * sizeof(JSCell*));
    7474}
    7575
    76 inline size_t ConservativeSet::size()
     76inline size_t ConservativeRoots::size()
    7777{
    7878    return m_size;
    7979}
    8080
    81 inline JSCell** ConservativeSet::set()
     81inline JSCell** ConservativeRoots::roots()
    8282{
    83     return m_set;
     83    return m_roots;
    8484}
    8585
    8686} // namespace JSC
    8787
    88 #endif // ConservativeSet_h
     88#endif // ConservativeRoots_h
Note: See TracChangeset for help on using the changeset viewer.