Title: [145329] trunk/Source/_javascript_Core
Revision
145329
Author
[email protected]
Date
2013-03-10 12:16:38 -0700 (Sun, 10 Mar 2013)

Log 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):

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (145328 => 145329)


--- trunk/Source/_javascript_Core/ChangeLog	2013-03-10 17:41:13 UTC (rev 145328)
+++ trunk/Source/_javascript_Core/ChangeLog	2013-03-10 19:16:38 UTC (rev 145329)
@@ -1,3 +1,19 @@
+2013-03-10  Andreas Kling  <[email protected]>
+
+        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):
+
 2013-03-09  Sheriff Bot  <[email protected]>
 
         Unreviewed, rolling out r145299.

Modified: trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT.cpp (145328 => 145329)


--- trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT.cpp	2013-03-10 17:41:13 UTC (rev 145328)
+++ trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT.cpp	2013-03-10 19:16:38 UTC (rev 145329)
@@ -56,7 +56,6 @@
 
 SpeculativeJIT::~SpeculativeJIT()
 {
-    WTF::deleteAllValues(m_slowPathGenerators);
 }
 
 void SpeculativeJIT::emitAllocateJSArray(GPRReg resultGPR, Structure* structure, GPRReg storageGPR, unsigned numElements)
@@ -344,7 +343,7 @@
 
 void SpeculativeJIT::addSlowPathGenerator(PassOwnPtr<SlowPathGenerator> slowPathGenerator)
 {
-    m_slowPathGenerators.append(slowPathGenerator.leakPtr());
+    m_slowPathGenerators.append(slowPathGenerator);
 }
 
 void SpeculativeJIT::runSlowPathGenerators()

Modified: trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT.h (145328 => 145329)


--- trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT.h	2013-03-10 17:41:13 UTC (rev 145328)
+++ trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT.h	2013-03-10 19:16:38 UTC (rev 145329)
@@ -2298,7 +2298,7 @@
     
     bool m_isCheckingArgumentTypes;
     
-    Vector<SlowPathGenerator*, 8> m_slowPathGenerators; // doesn't use OwnPtr<> because I don't want to include DFGSlowPathGenerator.h
+    Vector<OwnPtr<SlowPathGenerator>, 8> m_slowPathGenerators;
     Vector<SilentRegisterSavePlan> m_plans;
     
     ValueRecovery computeValueRecoveryFor(const ValueSource&);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to