X-Git-Url: https://git.saurik.com/apple/javascriptcore.git/blobdiff_plain/2d39b0e377c0896910ee49ae70082ba665faf986..HEAD:/dfg/DFGJITFinalizer.cpp diff --git a/dfg/DFGJITFinalizer.cpp b/dfg/DFGJITFinalizer.cpp index 8be38e4..836c0e0 100644 --- a/dfg/DFGJITFinalizer.cpp +++ b/dfg/DFGJITFinalizer.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2013 Apple Inc. All rights reserved. + * Copyright (C) 2013, 2015 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -29,6 +29,7 @@ #if ENABLE(DFG_JIT) #include "CodeBlock.h" +#include "CodeBlockWithJITType.h" #include "DFGCommon.h" #include "DFGPlan.h" #include "JSCInlines.h" @@ -36,10 +37,10 @@ namespace JSC { namespace DFG { -JITFinalizer::JITFinalizer(Plan& plan, PassRefPtr jitCode, PassOwnPtr linkBuffer, MacroAssemblerCodePtr withArityCheck) +JITFinalizer::JITFinalizer(Plan& plan, PassRefPtr jitCode, std::unique_ptr linkBuffer, MacroAssemblerCodePtr withArityCheck) : Finalizer(plan) , m_jitCode(jitCode) - , m_linkBuffer(linkBuffer) + , m_linkBuffer(WTF::move(linkBuffer)) , m_withArityCheck(withArityCheck) { } @@ -56,7 +57,9 @@ size_t JITFinalizer::codeSize() bool JITFinalizer::finalize() { m_jitCode->initializeCodeRef( - m_linkBuffer->finalizeCodeWithoutDisassembly(), MacroAssemblerCodePtr()); + FINALIZE_DFG_CODE(*m_linkBuffer, ("DFG JIT code for %s", toCString(CodeBlockWithJITType(m_plan.codeBlock.get(), JITCode::DFGJIT)).data())), + MacroAssemblerCodePtr()); + m_plan.codeBlock->setJITCode(m_jitCode); finalizeCommon(); @@ -68,7 +71,8 @@ bool JITFinalizer::finalizeFunction() { RELEASE_ASSERT(!m_withArityCheck.isEmptyValue()); m_jitCode->initializeCodeRef( - m_linkBuffer->finalizeCodeWithoutDisassembly(), m_withArityCheck); + FINALIZE_DFG_CODE(*m_linkBuffer, ("DFG JIT code for %s", toCString(CodeBlockWithJITType(m_plan.codeBlock.get(), JITCode::DFGJIT)).data())), + m_withArityCheck); m_plan.codeBlock->setJITCode(m_jitCode); finalizeCommon();