@@ -55,7 +55,7 @@ JITCompiler::JITCompiler(Graph& dfg)
5555 , m_blockHeads(dfg.numBlocks())
5656{
5757 if (shouldShowDisassembly () || m_graph.m_vm .m_perBytecodeProfiler )
58- m_disassembler = adoptPtr ( new Disassembler (dfg) );
58+ m_disassembler = std::make_unique< Disassembler> (dfg);
5959}
6060
6161JITCompiler::~JITCompiler ()
@@ -291,7 +291,7 @@ void JITCompiler::compile()
291291
292292 setStartOfCode ();
293293 compileEntry ();
294- m_speculative = adoptPtr ( new SpeculativeJIT (*this ) );
294+ m_speculative = std::make_unique< SpeculativeJIT> (*this );
295295 addPtr (TrustedImm32 (m_graph.stackPointerOffset () * sizeof (Register)), GPRInfo::callFrameRegister, stackPointerRegister);
296296 checkStackPointerAlignment ();
297297 compileBody ();
@@ -312,7 +312,7 @@ void JITCompiler::link()
312312{
313313 auto linkBuffer = std::make_unique<LinkBuffer>(*m_vm, *this , m_codeBlock, JITCompilationCanFail);
314314 if (linkBuffer->didFailToAllocate ()) {
315- m_graph.m_plan .finalizer = adoptPtr ( new FailedFinalizer (m_graph.m_plan ) );
315+ m_graph.m_plan .finalizer = std::make_unique< FailedFinalizer> (m_graph.m_plan );
316316 return ;
317317 }
318318
@@ -324,8 +324,8 @@ void JITCompiler::link()
324324
325325 disassemble (*linkBuffer);
326326
327- m_graph.m_plan .finalizer = adoptPtr ( new JITFinalizer (
328- m_graph.m_plan , m_jitCode.release (), WTF::move (linkBuffer))) ;
327+ m_graph.m_plan .finalizer = std::make_unique< JITFinalizer> (
328+ m_graph.m_plan , m_jitCode.release (), WTF::move (linkBuffer));
329329}
330330
331331void JITCompiler::compileFunction ()
@@ -349,7 +349,7 @@ void JITCompiler::compileFunction()
349349 checkStackPointerAlignment ();
350350
351351 // === Function body code generation ===
352- m_speculative = adoptPtr ( new SpeculativeJIT (*this ) );
352+ m_speculative = std::make_unique< SpeculativeJIT> (*this );
353353 compileBody ();
354354 setEndOfMainPath ();
355355
@@ -414,7 +414,7 @@ void JITCompiler::linkFunction()
414414 // === Link ===
415415 auto linkBuffer = std::make_unique<LinkBuffer>(*m_vm, *this , m_codeBlock, JITCompilationCanFail);
416416 if (linkBuffer->didFailToAllocate ()) {
417- m_graph.m_plan .finalizer = adoptPtr ( new FailedFinalizer (m_graph.m_plan ) );
417+ m_graph.m_plan .finalizer = std::make_unique< FailedFinalizer> (m_graph.m_plan );
418418 return ;
419419 }
420420 link (*linkBuffer);
@@ -429,8 +429,8 @@ void JITCompiler::linkFunction()
429429
430430 MacroAssemblerCodePtr withArityCheck = linkBuffer->locationOf (m_arityCheck);
431431
432- m_graph.m_plan .finalizer = adoptPtr ( new JITFinalizer (
433- m_graph.m_plan , m_jitCode.release (), WTF::move (linkBuffer), withArityCheck)) ;
432+ m_graph.m_plan .finalizer = std::make_unique< JITFinalizer> (
433+ m_graph.m_plan , m_jitCode.release (), WTF::move (linkBuffer), withArityCheck);
434434}
435435
436436void JITCompiler::disassemble (LinkBuffer& linkBuffer)
0 commit comments