/*
- * 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
#if ENABLE(DFG_JIT)
#include "CodeBlock.h"
+#include "CodeBlockWithJITType.h"
#include "DFGCommon.h"
#include "DFGPlan.h"
#include "JSCInlines.h"
namespace JSC { namespace DFG {
-JITFinalizer::JITFinalizer(Plan& plan, PassRefPtr<JITCode> jitCode, PassOwnPtr<LinkBuffer> linkBuffer, MacroAssemblerCodePtr withArityCheck)
+JITFinalizer::JITFinalizer(Plan& plan, PassRefPtr<JITCode> jitCode, std::unique_ptr<LinkBuffer> linkBuffer, MacroAssemblerCodePtr withArityCheck)
: Finalizer(plan)
, m_jitCode(jitCode)
- , m_linkBuffer(linkBuffer)
+ , m_linkBuffer(WTF::move(linkBuffer))
, m_withArityCheck(withArityCheck)
{
}
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();
{
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();