Changeset 177130 in webkit for trunk/Source/JavaScriptCore/heap


Ignore:
Timestamp:
Dec 10, 2014, 9:31:04 PM (10 years ago)
Author:
[email protected]
Message:

Use std::unique_ptr instead of OwnPtr in JSC - heap, jit, runtime, and parser directories
https://bugs.webkit.org/show_bug.cgi?id=139351

Reviewed by Filip Pizlo.

As a step to use std::unique_ptr<>, this cleans up OwnPtr and PassOwnPtr.

  • bytecode/SamplingTool.h:

(JSC::SamplingTool::SamplingTool):

  • heap/CopiedBlock.h:

(JSC::CopiedBlock::didSurviveGC):
(JSC::CopiedBlock::pin):

  • heap/CopiedBlockInlines.h:

(JSC::CopiedBlock::reportLiveBytes):

  • heap/GCActivityCallback.h:
  • heap/GCThread.cpp:
  • heap/Heap.h:
  • heap/HeapInlines.h:

(JSC::Heap::markListSet):

  • jit/ExecutableAllocator.cpp:
  • jit/JIT.cpp:

(JSC::JIT::privateCompile):

  • jit/JIT.h:
  • jit/JITThunks.cpp:

(JSC::JITThunks::JITThunks):
(JSC::JITThunks::clearHostFunctionStubs):

  • jit/JITThunks.h:
  • parser/Parser.cpp:

(JSC::Parser<LexerType>::Parser):

  • parser/Parser.h:

(JSC::Scope::Scope):
(JSC::Scope::pushLabel):

  • parser/ParserArena.cpp:
  • parser/ParserArena.h:

(JSC::ParserArena::identifierArena):

  • parser/SourceProviderCache.h:
  • runtime/CodeCache.h:
  • runtime/Executable.h:
  • runtime/JSArray.cpp:

(JSC::JSArray::sortVector):

  • runtime/JSGlobalObject.h:
Location:
trunk/Source/JavaScriptCore/heap
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/heap/CopiedBlock.h

    r164448 r177130  
    3333#include "Options.h"
    3434#include <wtf/Atomics.h>
    35 #include <wtf/OwnPtr.h>
    36 #include <wtf/PassOwnPtr.h>
    3735
    3836namespace JSC {
     
    9593
    9694    SpinLock m_workListLock;
    97     OwnPtr<CopyWorkList> m_workList;
     95    std::unique_ptr<CopyWorkList> m_workList;
    9896
    9997    size_t m_remaining;
     
    155153    m_isPinned = false;
    156154    if (m_workList)
    157         m_workList.clear();
     155        m_workList = nullptr;
    158156}
    159157
     
    186184    m_isPinned = true;
    187185    if (m_workList)
    188         m_workList.clear();
     186        m_workList = nullptr;
    189187}
    190188
  • trunk/Source/JavaScriptCore/heap/CopiedBlockInlines.h

    r166375 r177130  
    6363
    6464    if (!m_workList)
    65         m_workList = adoptPtr(new CopyWorkList(Heap::heap(owner)->blockAllocator()));
     65        m_workList = std::make_unique<CopyWorkList>(Heap::heap(owner)->blockAllocator());
    6666
    6767    m_workList->append(CopyWorklistItem(owner, token));
  • trunk/Source/JavaScriptCore/heap/GCActivityCallback.h

    r165940 r177130  
    3131
    3232#include "HeapTimer.h"
    33 #include <wtf/OwnPtr.h>
    3433#include <wtf/PassRefPtr.h>
    3534
  • trunk/Source/JavaScriptCore/heap/GCThread.cpp

    r163844 r177130  
    3333#include "SlotVisitor.h"
    3434#include <wtf/MainThread.h>
    35 #include <wtf/PassOwnPtr.h>
    3635
    3736namespace JSC {
  • trunk/Source/JavaScriptCore/heap/Heap.h

    r176424 r177130  
    354354    ProtectCountSet m_protectedValues;
    355355    Vector<Vector<ValueStringPair, 0, UnsafeVectorOverflow>*> m_tempSortingVectors;
    356     OwnPtr<HashSet<MarkedArgumentBuffer*>> m_markListSet;
     356    std::unique_ptr<HashSet<MarkedArgumentBuffer*>> m_markListSet;
    357357
    358358    MachineThreads m_machineThreads;
  • trunk/Source/JavaScriptCore/heap/HeapInlines.h

    r170774 r177130  
    287287{
    288288    if (!m_markListSet)
    289         m_markListSet = adoptPtr(new HashSet<MarkedArgumentBuffer*>);
     289        m_markListSet = std::make_unique<HashSet<MarkedArgumentBuffer*>>();
    290290    return *m_markListSet;
    291291}
Note: See TracChangeset for help on using the changeset viewer.