Changeset 145329 in webkit


Ignore:
Timestamp:
Mar 10, 2013 12:16:38 PM (11 years ago)
Author:
akling@apple.com
Message:

SpeculativeJIT should use OwnPtr<SlowPathGenerator>.
<http://webkit.org/b/111942>

Reviewed by Anders Carlsson.

There's no need to include DFGSlowPathGenerator.h from the header as long as the destructor is out-of-line,
so let's use OwnPtr instead of raw pointers + deleteAllValues().

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::~SpeculativeJIT):
(JSC::DFG::SpeculativeJIT::addSlowPathGenerator):

  • dfg/DFGSpeculativeJIT.h:

(SpeculativeJIT):

Location:
trunk/Source/JavaScriptCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r145323 r145329  
     12013-03-10  Andreas Kling  <akling@apple.com>
     2
     3        SpeculativeJIT should use OwnPtr<SlowPathGenerator>.
     4        <http://webkit.org/b/111942>
     5
     6        Reviewed by Anders Carlsson.
     7
     8        There's no need to include DFGSlowPathGenerator.h from the header as long as the destructor is out-of-line,
     9        so let's use OwnPtr instead of raw pointers + deleteAllValues().
     10
     11        * dfg/DFGSpeculativeJIT.cpp:
     12        (JSC::DFG::SpeculativeJIT::~SpeculativeJIT):
     13        (JSC::DFG::SpeculativeJIT::addSlowPathGenerator):
     14        * dfg/DFGSpeculativeJIT.h:
     15        (SpeculativeJIT):
     16
    1172013-03-09  Sheriff Bot  <webkit.review.bot@gmail.com>
    218
  • trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp

    r144886 r145329  
    5757SpeculativeJIT::~SpeculativeJIT()
    5858{
    59     WTF::deleteAllValues(m_slowPathGenerators);
    6059}
    6160
     
    345344void SpeculativeJIT::addSlowPathGenerator(PassOwnPtr<SlowPathGenerator> slowPathGenerator)
    346345{
    347     m_slowPathGenerators.append(slowPathGenerator.leakPtr());
     346    m_slowPathGenerators.append(slowPathGenerator);
    348347}
    349348
  • trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.h

    r144886 r145329  
    22992299    bool m_isCheckingArgumentTypes;
    23002300   
    2301     Vector<SlowPathGenerator*, 8> m_slowPathGenerators; // doesn't use OwnPtr<> because I don't want to include DFGSlowPathGenerator.h
     2301    Vector<OwnPtr<SlowPathGenerator>, 8> m_slowPathGenerators;
    23022302    Vector<SilentRegisterSavePlan> m_plans;
    23032303   
Note: See TracChangeset for help on using the changeset viewer.