WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Patch
bug-139169-20141202113420.patch (text/plain), 8.95 KB, created by
Gyuyoung Kim
on 2014-12-01 18:33:51 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Gyuyoung Kim
Created:
2014-12-01 18:33:51 PST
Size:
8.95 KB
patch
obsolete
>Subversion Revision: 176620 >diff --git a/Source/JavaScriptCore/ChangeLog b/Source/JavaScriptCore/ChangeLog >index d1b916242ca70760540b5607af070db9f5c89411..69866d253df74d5e4ca17f0c5d5275598980378a 100644 >--- a/Source/JavaScriptCore/ChangeLog >+++ b/Source/JavaScriptCore/ChangeLog >@@ -1,3 +1,27 @@ >+2014-12-01 Gyuyoung Kim <gyuyoung.kim@samsung.com> >+ >+ Move JavaScriptCore/dfg to std::unique_ptr >+ https://bugs.webkit.org/show_bug.cgi?id=139169 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Use std::unique_ptr<>|std::make_unique<> in JavaScriptCore/dfg directory. >+ >+ * dfg/DFGBasicBlock.h: >+ * dfg/DFGJITCompiler.cpp: >+ (JSC::DFG::JITCompiler::JITCompiler): >+ (JSC::DFG::JITCompiler::compile): >+ (JSC::DFG::JITCompiler::link): >+ (JSC::DFG::JITCompiler::compileFunction): >+ (JSC::DFG::JITCompiler::linkFunction): >+ * dfg/DFGJITCompiler.h: >+ * dfg/DFGPlan.cpp: >+ (JSC::DFG::Plan::compileInThreadImpl): >+ (JSC::DFG::Plan::cancel): >+ * dfg/DFGPlan.h: >+ * dfg/DFGSlowPathGenerator.h: >+ * dfg/DFGWorklist.h: >+ > 2014-12-01 Alexey Proskuryakov <ap@apple.com> > > Several JavaScriptCore date tests are flaky, because they expect time to be frozen during execution >diff --git a/Source/JavaScriptCore/dfg/DFGBasicBlock.h b/Source/JavaScriptCore/dfg/DFGBasicBlock.h >index e39cac43a22612cb46a522074bc0bca7e0c83948..f47f770aeb54106096d64cf03f073852327c1f68 100644 >--- a/Source/JavaScriptCore/dfg/DFGBasicBlock.h >+++ b/Source/JavaScriptCore/dfg/DFGBasicBlock.h >@@ -39,7 +39,6 @@ > #include "Operands.h" > #include <wtf/HashMap.h> > #include <wtf/HashSet.h> >-#include <wtf/OwnPtr.h> > #include <wtf/Vector.h> > > namespace JSC { namespace DFG { >diff --git a/Source/JavaScriptCore/dfg/DFGJITCompiler.cpp b/Source/JavaScriptCore/dfg/DFGJITCompiler.cpp >index 8aaec25c552d8261073401459f59ef5c8df623b2..1379e519b5e2f8030b9b15b7a5a2bfb1c4f3f301 100644 >--- a/Source/JavaScriptCore/dfg/DFGJITCompiler.cpp >+++ b/Source/JavaScriptCore/dfg/DFGJITCompiler.cpp >@@ -55,7 +55,7 @@ JITCompiler::JITCompiler(Graph& dfg) > , m_blockHeads(dfg.numBlocks()) > { > if (shouldShowDisassembly() || m_graph.m_vm.m_perBytecodeProfiler) >- m_disassembler = adoptPtr(new Disassembler(dfg)); >+ m_disassembler = std::make_unique<Disassembler>(dfg); > } > > JITCompiler::~JITCompiler() >@@ -291,7 +291,7 @@ void JITCompiler::compile() > > setStartOfCode(); > compileEntry(); >- m_speculative = adoptPtr(new SpeculativeJIT(*this)); >+ m_speculative = std::make_unique<SpeculativeJIT>(*this); > addPtr(TrustedImm32(m_graph.stackPointerOffset() * sizeof(Register)), GPRInfo::callFrameRegister, stackPointerRegister); > checkStackPointerAlignment(); > compileBody(); >@@ -312,7 +312,7 @@ void JITCompiler::link() > { > auto linkBuffer = std::make_unique<LinkBuffer>(*m_vm, *this, m_codeBlock, JITCompilationCanFail); > if (linkBuffer->didFailToAllocate()) { >- m_graph.m_plan.finalizer = adoptPtr(new FailedFinalizer(m_graph.m_plan)); >+ m_graph.m_plan.finalizer = std::make_unique<FailedFinalizer>(m_graph.m_plan); > return; > } > >@@ -324,8 +324,8 @@ void JITCompiler::link() > > disassemble(*linkBuffer); > >- m_graph.m_plan.finalizer = adoptPtr(new JITFinalizer( >- m_graph.m_plan, m_jitCode.release(), WTF::move(linkBuffer))); >+ m_graph.m_plan.finalizer = std::make_unique<JITFinalizer>( >+ m_graph.m_plan, m_jitCode.release(), WTF::move(linkBuffer)); > } > > void JITCompiler::compileFunction() >@@ -349,7 +349,7 @@ void JITCompiler::compileFunction() > checkStackPointerAlignment(); > > // === Function body code generation === >- m_speculative = adoptPtr(new SpeculativeJIT(*this)); >+ m_speculative = std::make_unique<SpeculativeJIT>(*this); > compileBody(); > setEndOfMainPath(); > >@@ -414,7 +414,7 @@ void JITCompiler::linkFunction() > // === Link === > auto linkBuffer = std::make_unique<LinkBuffer>(*m_vm, *this, m_codeBlock, JITCompilationCanFail); > if (linkBuffer->didFailToAllocate()) { >- m_graph.m_plan.finalizer = adoptPtr(new FailedFinalizer(m_graph.m_plan)); >+ m_graph.m_plan.finalizer = std::make_unique<FailedFinalizer>(m_graph.m_plan); > return; > } > link(*linkBuffer); >@@ -429,8 +429,8 @@ void JITCompiler::linkFunction() > > MacroAssemblerCodePtr withArityCheck = linkBuffer->locationOf(m_arityCheck); > >- m_graph.m_plan.finalizer = adoptPtr(new JITFinalizer( >- m_graph.m_plan, m_jitCode.release(), WTF::move(linkBuffer), withArityCheck)); >+ m_graph.m_plan.finalizer = std::make_unique<JITFinalizer>( >+ m_graph.m_plan, m_jitCode.release(), WTF::move(linkBuffer), withArityCheck); > } > > void JITCompiler::disassemble(LinkBuffer& linkBuffer) >diff --git a/Source/JavaScriptCore/dfg/DFGJITCompiler.h b/Source/JavaScriptCore/dfg/DFGJITCompiler.h >index 70aae712ab6d2eee0e22d272775d5eb89a2cc76e..9784f285bc551e57f9264ba16d79c46c589cc55f 100644 >--- a/Source/JavaScriptCore/dfg/DFGJITCompiler.h >+++ b/Source/JavaScriptCore/dfg/DFGJITCompiler.h >@@ -336,7 +336,7 @@ private: > // The dataflow graph currently being generated. > Graph& m_graph; > >- OwnPtr<Disassembler> m_disassembler; >+ std::unique_ptr<Disassembler> m_disassembler; > > RefPtr<JITCode> m_jitCode; > >@@ -372,7 +372,7 @@ private: > > Call m_callArityFixup; > Label m_arityCheck; >- OwnPtr<SpeculativeJIT> m_speculative; >+ std::unique_ptr<SpeculativeJIT> m_speculative; > }; > > } } // namespace JSC::DFG >diff --git a/Source/JavaScriptCore/dfg/DFGPlan.cpp b/Source/JavaScriptCore/dfg/DFGPlan.cpp >index 913cadc57e2524ad7414cbcde7600d8b5fe60c58..795b7e3af8513b7a7d16204b3d4ea46eee42feb4 100644 >--- a/Source/JavaScriptCore/dfg/DFGPlan.cpp >+++ b/Source/JavaScriptCore/dfg/DFGPlan.cpp >@@ -207,7 +207,7 @@ Plan::CompilationPath Plan::compileInThreadImpl(LongLivedState& longLivedState) > Graph dfg(vm, *this, longLivedState); > > if (!parse(dfg)) { >- finalizer = adoptPtr(new FailedFinalizer(*this)); >+ finalizer = std::make_unique<FailedFinalizer>(*this); > return FailPath; > } > >@@ -229,7 +229,7 @@ Plan::CompilationPath Plan::compileInThreadImpl(LongLivedState& longLivedState) > if (mode == FTLForOSREntryMode) { > bool result = performOSREntrypointCreation(dfg); > if (!result) { >- finalizer = adoptPtr(new FailedFinalizer(*this)); >+ finalizer = std::make_unique<FailedFinalizer>(*this); > return FailPath; > } > performCPSRethreading(dfg); >@@ -313,7 +313,7 @@ Plan::CompilationPath Plan::compileInThreadImpl(LongLivedState& longLivedState) > case FTLForOSREntryMode: { > #if ENABLE(FTL_JIT) > if (FTL::canCompile(dfg) == FTL::CannotCompile) { >- finalizer = adoptPtr(new FailedFinalizer(*this)); >+ finalizer = std::make_unique<FailedFinalizer>(*this); > return FailPath; > } > >@@ -375,7 +375,7 @@ Plan::CompilationPath Plan::compileInThreadImpl(LongLivedState& longLivedState) > return CancelPath; > > if (!haveLLVM) { >- finalizer = adoptPtr(new FailedFinalizer(*this)); >+ finalizer = std::make_unique<FailedFinalizer>(*this); > return FailPath; > } > >@@ -524,7 +524,7 @@ void Plan::cancel() > profiledDFGCodeBlock = nullptr; > mustHandleValues.clear(); > compilation = nullptr; >- finalizer.clear(); >+ finalizer = nullptr; > inlineCallFrames = nullptr; > watchpoints = DesiredWatchpoints(); > identifiers = DesiredIdentifiers(); >diff --git a/Source/JavaScriptCore/dfg/DFGPlan.h b/Source/JavaScriptCore/dfg/DFGPlan.h >index f2de086ecb2697aa147d1bf81ffdd41aa39e5fa6..6bcdbe02265afd96884bf99eb0998b39dc7fe9da 100644 >--- a/Source/JavaScriptCore/dfg/DFGPlan.h >+++ b/Source/JavaScriptCore/dfg/DFGPlan.h >@@ -86,7 +86,7 @@ struct Plan : public ThreadSafeRefCounted<Plan> { > > RefPtr<Profiler::Compilation> compilation; > >- OwnPtr<Finalizer> finalizer; >+ std::unique_ptr<Finalizer> finalizer; > > RefPtr<InlineCallFrameSet> inlineCallFrames; > DesiredWatchpoints watchpoints; >diff --git a/Source/JavaScriptCore/dfg/DFGSlowPathGenerator.h b/Source/JavaScriptCore/dfg/DFGSlowPathGenerator.h >index 90e3cd971243f47fce19eb946e52f312a53f66b1..add1a23f2c5b2b0b689f0c02ab115650aef809e7 100644 >--- a/Source/JavaScriptCore/dfg/DFGSlowPathGenerator.h >+++ b/Source/JavaScriptCore/dfg/DFGSlowPathGenerator.h >@@ -32,7 +32,6 @@ > #include "DFGSilentRegisterSavePlan.h" > #include "DFGSpeculativeJIT.h" > #include <wtf/FastMalloc.h> >-#include <wtf/PassOwnPtr.h> > > namespace JSC { namespace DFG { > >diff --git a/Source/JavaScriptCore/dfg/DFGWorklist.h b/Source/JavaScriptCore/dfg/DFGWorklist.h >index 3d0b5d6eed2d8d002b10ee91e122c0121a2a1627..f61ae4aeb8c74ce59e990dcc6a14298e06c9ca97 100644 >--- a/Source/JavaScriptCore/dfg/DFGWorklist.h >+++ b/Source/JavaScriptCore/dfg/DFGWorklist.h >@@ -33,7 +33,6 @@ > #include <wtf/Deque.h> > #include <wtf/HashMap.h> > #include <wtf/Noncopyable.h> >-#include <wtf/PassOwnPtr.h> > #include <wtf/ThreadingPrimitives.h> > > namespace JSC {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 139169
:
242376
|
242378
|
242379
|
242382
|
242410