Ignore:
Timestamp:
Jan 8, 2011, 7:04:42 PM (14 years ago)
Author:
[email protected]
Message:

2011-01-07 Geoffrey Garen <[email protected]>

Reviewed by Gavin Barraclough.

Split machine stack marking functions into their own class (MachineStackMarker)
https://bugs.webkit.org/show_bug.cgi?id=52088

  • API/APIShims.h: (JSC::APIEntryShimWithoutLock::APIEntryShimWithoutLock): Moved registerThread() call behind an #ifdef because we shouldn't be registering threads at all if we don't support usage on multiple threads.
  • runtime/Collector.cpp: (JSC::Heap::Heap): (JSC::Heap::destroy): (JSC::Heap::markRoots):
  • runtime/Collector.h: (JSC::Heap::machineStackMarker): Moved code to machineStackMarker.
  • runtime/JSGlobalData.h: (JSC::JSGlobalData::makeUsableFromMultipleThreads): Removed an unnecessary level of indirection, to make Heap less of a God class.
  • runtime/MachineStackMarker.h: Copied from Source/JavaScriptCore/runtime/Collector.h.
  • runtime/MachineStackMarker.cpp: Copied from Source/JavaScriptCore/runtime/Collector.cpp. (JSC::MachineStackMarker::MachineStackMarker): (JSC::MachineStackMarker::~MachineStackMarker): (JSC::MachineStackMarker::makeUsableFromMultipleThreads): (JSC::MachineStackMarker::registerThread): (JSC::MachineStackMarker::unregisterThread): (JSC::MachineStackMarker::markCurrentThreadConservativelyInternal): (JSC::MachineStackMarker::markCurrentThreadConservatively): (JSC::MachineStackMarker::markOtherThreadConservatively): (JSC::MachineStackMarker::markMachineStackConservatively): Moved code from Heap.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/API/APIShims.h

    r73223 r75342  
    4040        , m_entryIdentifierTable(wtfThreadData().setCurrentIdentifierTable(globalData->identifierTable))
    4141    {
     42        UNUSED_PARAM(registerThread);
     43#if ENABLE(JSC_MULTIPLE_THREADS)
    4244        if (registerThread)
    43             globalData->heap.registerThread();
     45            globalData->heap.machineStackMarker().registerThread();
     46#endif
    4447        m_globalData->heap.activityCallback()->synchronize();
    4548        m_globalData->timeoutChecker.start();
Note: See TracChangeset for help on using the changeset viewer.