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


Ignore:
Timestamp:
Nov 27, 2014, 4:51:32 PM (11 years ago)
Author:
[email protected]
Message:

Use std::unique_ptr instead of OwnPtr in JSC classes
https://bugs.webkit.org/show_bug.cgi?id=139009

Reviewed by Filip Pizlo.

As a step of using std::unique_ptr<>, this patch replaces OwnPtr with
std::unique_ptr<>|std::make_unique<>.

  • bytecode/DFGExitProfile.cpp:

(JSC::DFG::ExitProfile::add):

  • bytecode/DFGExitProfile.h:
  • bytecode/LazyOperandValueProfile.cpp:

(JSC::CompressedLazyOperandValueProfileHolder::add):

  • bytecode/LazyOperandValueProfile.h:
  • heap/MarkedBlock.cpp:

(JSC::MarkedBlock::specializedSweep):
(JSC::MarkedBlock::stopAllocating):

  • heap/MarkedBlock.h:

(JSC::MarkedBlock::clearNewlyAllocated):

  • inspector/ContentSearchUtilities.cpp:

(Inspector::ContentSearchUtilities::findMagicComment):

  • runtime/RegExp.cpp:

(JSC::RegExp::invalidateCode):

  • runtime/RegExp.h:
  • yarr/RegularExpression.cpp:

(JSC::Yarr::RegularExpression::Private::compile):
(JSC::Yarr::RegularExpression::isValid):

  • yarr/YarrInterpreter.cpp:

(JSC::Yarr::ByteCompiler::compile):
(JSC::Yarr::ByteCompiler::regexBegin):
(JSC::Yarr::byteCompile):

  • yarr/YarrInterpreter.h:

(JSC::Yarr::BytecodePattern::BytecodePattern):

Location:
trunk/Source/JavaScriptCore/heap
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/heap/MarkedBlock.cpp

    r171953 r176553  
    103103    // otherwise we would lose information on what's currently alive.
    104104    if (sweepMode == SweepToFreeList && m_newlyAllocated)
    105         m_newlyAllocated.clear();
     105        m_newlyAllocated = nullptr;
    106106
    107107    m_state = ((sweepMode == SweepToFreeList) ? FreeListed : Marked);
     
    191191   
    192192    ASSERT(!m_newlyAllocated);
    193     m_newlyAllocated = adoptPtr(new WTF::Bitmap<atomsPerBlock>());
     193    m_newlyAllocated = std::make_unique<WTF::Bitmap<atomsPerBlock>>();
    194194
    195195    SetNewlyAllocatedFunctor functor(this);
  • trunk/Source/JavaScriptCore/heap/MarkedBlock.h

    r169284 r176553  
    210210        WTF::Bitmap<atomsPerBlock, WTF::BitmapNotAtomic, uint8_t> m_rememberedSet;
    211211#endif
    212         OwnPtr<WTF::Bitmap<atomsPerBlock>> m_newlyAllocated;
     212        std::unique_ptr<WTF::Bitmap<atomsPerBlock>> m_newlyAllocated;
    213213
    214214        DestructorType m_destructorType;
     
    401401    {
    402402        if (m_newlyAllocated) {
    403             m_newlyAllocated.clear();
     403            m_newlyAllocated = nullptr;
    404404            return true;
    405405        }
Note: See TracChangeset for help on using the changeset viewer.