<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[150520] branches/dfgFourthTier/Source/JavaScriptCore</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/150520">150520</a></dd>
<dt>Author</dt> <dd>fpizlo@apple.com</dd>
<dt>Date</dt> <dd>2013-05-22 10:01:01 -0700 (Wed, 22 May 2013)</dd>
</dl>

<h3>Log Message</h3>
<pre>FTL should force LLVM to use our own JIT memory allocator, and we shouldn't have to keep around an LLVMExecutionEngineRef to keep code alive
https://bugs.webkit.org/show_bug.cgi?id=113619

Reviewed by Geoffrey Garen.
        
This uses new API that I've exposed, which allows for memory manager callbacks
from within LLVM. LLVM may allocate multiple independent chunks of memory for
a module, and we track all of those in a Vector in FTL::JITCode.

* ftl/FTLCompile.cpp:
(JSC::FTL::mmAllocateCodeSection):
(FTL):
(JSC::FTL::mmAllocateDataSection):
(JSC::FTL::mmApplyPermissions):
(JSC::FTL::mmDestroy):
(JSC::FTL::compile):
* ftl/FTLJITCode.cpp:
(JSC::FTL::JITCode::JITCode):
(JSC::FTL::JITCode::~JITCode):
(JSC::FTL::JITCode::addHandle):
(FTL):
(JSC::FTL::JITCode::initializeCode):
* ftl/FTLJITCode.h:
(JITCode):
(JSC::FTL::JITCode::handles):
* ftl/FTLJITFinalizer.cpp:
(JSC::FTL::JITFinalizer::~JITFinalizer):
(JSC::FTL::JITFinalizer::finalizeFunction):
* ftl/FTLJITFinalizer.h:
(JSC::FTL::JITFinalizer::initializeEntrypointLinkBuffer):
(JITFinalizer):
* ftl/FTLLink.cpp:
(JSC::FTL::link):
* ftl/FTLState.cpp:
(JSC::FTL::State::State):
* ftl/FTLState.h:
(State):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#branchesdfgFourthTierSourceJavaScriptCoreChangeLog">branches/dfgFourthTier/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#branchesdfgFourthTierSourceJavaScriptCoreftlFTLCompilecpp">branches/dfgFourthTier/Source/JavaScriptCore/ftl/FTLCompile.cpp</a></li>
<li><a href="#branchesdfgFourthTierSourceJavaScriptCoreftlFTLJITCodecpp">branches/dfgFourthTier/Source/JavaScriptCore/ftl/FTLJITCode.cpp</a></li>
<li><a href="#branchesdfgFourthTierSourceJavaScriptCoreftlFTLJITCodeh">branches/dfgFourthTier/Source/JavaScriptCore/ftl/FTLJITCode.h</a></li>
<li><a href="#branchesdfgFourthTierSourceJavaScriptCoreftlFTLJITFinalizercpp">branches/dfgFourthTier/Source/JavaScriptCore/ftl/FTLJITFinalizer.cpp</a></li>
<li><a href="#branchesdfgFourthTierSourceJavaScriptCoreftlFTLJITFinalizerh">branches/dfgFourthTier/Source/JavaScriptCore/ftl/FTLJITFinalizer.h</a></li>
<li><a href="#branchesdfgFourthTierSourceJavaScriptCoreftlFTLLinkcpp">branches/dfgFourthTier/Source/JavaScriptCore/ftl/FTLLink.cpp</a></li>
<li><a href="#branchesdfgFourthTierSourceJavaScriptCoreftlFTLStatecpp">branches/dfgFourthTier/Source/JavaScriptCore/ftl/FTLState.cpp</a></li>
<li><a href="#branchesdfgFourthTierSourceJavaScriptCoreftlFTLStateh">branches/dfgFourthTier/Source/JavaScriptCore/ftl/FTLState.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="branchesdfgFourthTierSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: branches/dfgFourthTier/Source/JavaScriptCore/ChangeLog (150519 => 150520)</h4>
<pre class="diff"><span>
<span class="info">--- branches/dfgFourthTier/Source/JavaScriptCore/ChangeLog        2013-05-22 16:42:29 UTC (rev 150519)
+++ branches/dfgFourthTier/Source/JavaScriptCore/ChangeLog        2013-05-22 17:01:01 UTC (rev 150520)
</span><span class="lines">@@ -1,3 +1,43 @@
</span><ins>+2013-05-18  Filip Pizlo  &lt;fpizlo@apple.com&gt;
+
+        FTL should force LLVM to use our own JIT memory allocator, and we shouldn't have to keep around an LLVMExecutionEngineRef to keep code alive
+        https://bugs.webkit.org/show_bug.cgi?id=113619
+
+        Reviewed by Geoffrey Garen.
+        
+        This uses new API that I've exposed, which allows for memory manager callbacks
+        from within LLVM. LLVM may allocate multiple independent chunks of memory for
+        a module, and we track all of those in a Vector in FTL::JITCode.
+
+        * ftl/FTLCompile.cpp:
+        (JSC::FTL::mmAllocateCodeSection):
+        (FTL):
+        (JSC::FTL::mmAllocateDataSection):
+        (JSC::FTL::mmApplyPermissions):
+        (JSC::FTL::mmDestroy):
+        (JSC::FTL::compile):
+        * ftl/FTLJITCode.cpp:
+        (JSC::FTL::JITCode::JITCode):
+        (JSC::FTL::JITCode::~JITCode):
+        (JSC::FTL::JITCode::addHandle):
+        (FTL):
+        (JSC::FTL::JITCode::initializeCode):
+        * ftl/FTLJITCode.h:
+        (JITCode):
+        (JSC::FTL::JITCode::handles):
+        * ftl/FTLJITFinalizer.cpp:
+        (JSC::FTL::JITFinalizer::~JITFinalizer):
+        (JSC::FTL::JITFinalizer::finalizeFunction):
+        * ftl/FTLJITFinalizer.h:
+        (JSC::FTL::JITFinalizer::initializeEntrypointLinkBuffer):
+        (JITFinalizer):
+        * ftl/FTLLink.cpp:
+        (JSC::FTL::link):
+        * ftl/FTLState.cpp:
+        (JSC::FTL::State::State):
+        * ftl/FTLState.h:
+        (State):
+
</ins><span class="cx"> 2013-05-12  Filip Pizlo  &lt;fpizlo@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         fourthTier: FTL shouldn't use FastISel and Small code model should be turned off for now
</span></span></pre></div>
<a id="branchesdfgFourthTierSourceJavaScriptCoreftlFTLCompilecpp"></a>
<div class="modfile"><h4>Modified: branches/dfgFourthTier/Source/JavaScriptCore/ftl/FTLCompile.cpp (150519 => 150520)</h4>
<pre class="diff"><span>
<span class="info">--- branches/dfgFourthTier/Source/JavaScriptCore/ftl/FTLCompile.cpp        2013-05-22 16:42:29 UTC (rev 150519)
+++ branches/dfgFourthTier/Source/JavaScriptCore/ftl/FTLCompile.cpp        2013-05-22 17:01:01 UTC (rev 150520)
</span><span class="lines">@@ -31,6 +31,7 @@
</span><span class="cx"> #include &quot;CodeBlockWithJITType.h&quot;
</span><span class="cx"> #include &quot;DFGCCallHelpers.h&quot;
</span><span class="cx"> #include &quot;DFGCommon.h&quot;
</span><ins>+#include &quot;FTLJITCode.h&quot;
</ins><span class="cx"> #include &quot;FTLLLVMHeaders.h&quot;
</span><span class="cx"> #include &quot;JITStubs.h&quot;
</span><span class="cx"> #include &quot;LinkBuffer.h&quot;
</span><span class="lines">@@ -39,6 +40,44 @@
</span><span class="cx"> 
</span><span class="cx"> using namespace DFG;
</span><span class="cx"> 
</span><ins>+static uint8_t* mmAllocateCodeSection(
+    void* opaqueState, uintptr_t size, unsigned alignment, unsigned sectionID)
+{
+    UNUSED_PARAM(sectionID);
+    
+    State&amp; state = *static_cast&lt;State*&gt;(opaqueState);
+    
+    ASSERT(alignment &lt;= jitAllocationGranule);
+    
+    RefPtr&lt;ExecutableMemoryHandle&gt; result =
+        state.graph.m_vm.executableAllocator.allocate(
+            state.graph.m_vm, size, state.graph.m_codeBlock, JITCompilationMustSucceed);
+    
+    state.jitCode-&gt;addHandle(result);
+    
+    return static_cast&lt;uint8_t*&gt;(result-&gt;start());
+}
+
+static uint8_t* mmAllocateDataSection(
+    void* opaqueState, uintptr_t size, unsigned alignment, unsigned sectionID,
+    LLVMBool isReadOnly)
+{
+    // FIXME: fourthTier: FTL memory allocator should be able to allocate data
+    // sections in non-executable memory.
+    // https://bugs.webkit.org/show_bug.cgi?id=116189
+    UNUSED_PARAM(isReadOnly);
+    return mmAllocateCodeSection(opaqueState, size, alignment, sectionID);
+}
+
+static LLVMBool mmApplyPermissions(void*, char**)
+{
+    return false;
+}
+
+static void mmDestroy(void*)
+{
+}
+
</ins><span class="cx"> void compile(State&amp; state)
</span><span class="cx"> {
</span><span class="cx">     char* error = 0;
</span><span class="lines">@@ -50,14 +89,18 @@
</span><span class="cx">     if (Options::useLLVMSmallCodeModel())
</span><span class="cx">         options.CodeModel = LLVMCodeModelSmall;
</span><span class="cx">     options.EnableFastISel = Options::enableLLVMFastISel();
</span><ins>+    options.MCJMM = LLVMCreateSimpleMCJITMemoryManager(
+        &amp;state, mmAllocateCodeSection, mmAllocateDataSection, mmApplyPermissions, mmDestroy);
</ins><span class="cx">     
</span><del>-    if (LLVMCreateMCJITCompilerForModule(&amp;state.engine, state.module, &amp;options, sizeof(options), &amp;error)) {
</del><ins>+    LLVMExecutionEngineRef engine;
+    
+    if (LLVMCreateMCJITCompilerForModule(&amp;engine, state.module, &amp;options, sizeof(options), &amp;error)) {
</ins><span class="cx">         dataLog(&quot;FATAL: Could not create LLVM execution engine: &quot;, error, &quot;\n&quot;);
</span><span class="cx">         CRASH();
</span><span class="cx">     }
</span><span class="cx">     
</span><span class="cx">     LLVMPassManagerRef pass = LLVMCreatePassManager();
</span><del>-    LLVMAddTargetData(LLVMGetExecutionEngineTargetData(state.engine), pass);
</del><ins>+    LLVMAddTargetData(LLVMGetExecutionEngineTargetData(engine), pass);
</ins><span class="cx">     LLVMAddConstantPropagationPass(pass);
</span><span class="cx">     LLVMAddInstructionCombiningPass(pass);
</span><span class="cx">     LLVMAddPromoteMemoryToRegisterPass(pass);
</span><span class="lines">@@ -69,13 +112,11 @@
</span><span class="cx">     if (DFG::shouldShowDisassembly() || DFG::verboseCompilationEnabled())
</span><span class="cx">         state.dumpState(&quot;after optimization&quot;);
</span><span class="cx">     
</span><del>-    // FIXME: LLVM should use our own JIT memory allocator, and we shouldn't have to
-    // keep around an LLVMExecutionEngineRef to keep code alive.
-    // https://bugs.webkit.org/show_bug.cgi?id=113619
</del><span class="cx">     // FIXME: Need to add support for the case where JIT memory allocation failed.
</span><span class="cx">     // https://bugs.webkit.org/show_bug.cgi?id=113620
</span><del>-    state.generatedFunction = reinterpret_cast&lt;GeneratedFunction&gt;(LLVMGetPointerToGlobal(state.engine, state.function));
</del><ins>+    state.generatedFunction = reinterpret_cast&lt;GeneratedFunction&gt;(LLVMGetPointerToGlobal(engine, state.function));
</ins><span class="cx">     LLVMDisposePassManager(pass);
</span><ins>+    LLVMDisposeExecutionEngine(engine);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> } } // namespace JSC::FTL
</span></span></pre></div>
<a id="branchesdfgFourthTierSourceJavaScriptCoreftlFTLJITCodecpp"></a>
<div class="modfile"><h4>Modified: branches/dfgFourthTier/Source/JavaScriptCore/ftl/FTLJITCode.cpp (150519 => 150520)</h4>
<pre class="diff"><span>
<span class="info">--- branches/dfgFourthTier/Source/JavaScriptCore/ftl/FTLJITCode.cpp        2013-05-22 16:42:29 UTC (rev 150519)
+++ branches/dfgFourthTier/Source/JavaScriptCore/ftl/FTLJITCode.cpp        2013-05-22 17:01:01 UTC (rev 150520)
</span><span class="lines">@@ -32,14 +32,11 @@
</span><span class="cx"> 
</span><span class="cx"> JITCode::JITCode()
</span><span class="cx">     : JSC::JITCode(FTLJIT)
</span><del>-    , m_engine(0)
</del><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> JITCode::~JITCode()
</span><span class="cx"> {
</span><del>-    if (m_engine)
-        LLVMDisposeExecutionEngine(m_engine);
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void JITCode::initializeExitThunks(CodeRef exitThunks)
</span><span class="lines">@@ -47,9 +44,13 @@
</span><span class="cx">     m_exitThunks = exitThunks;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void JITCode::initializeCode(LLVMExecutionEngineRef engine, CodeRef entrypoint)
</del><ins>+void JITCode::addHandle(PassRefPtr&lt;ExecutableMemoryHandle&gt; handle)
</ins><span class="cx"> {
</span><del>-    m_engine = engine;
</del><ins>+    m_handles.append(handle);
+}
+
+void JITCode::initializeCode(CodeRef entrypoint)
+{
</ins><span class="cx">     m_entrypoint = entrypoint;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="branchesdfgFourthTierSourceJavaScriptCoreftlFTLJITCodeh"></a>
<div class="modfile"><h4>Modified: branches/dfgFourthTier/Source/JavaScriptCore/ftl/FTLJITCode.h (150519 => 150520)</h4>
<pre class="diff"><span>
<span class="info">--- branches/dfgFourthTier/Source/JavaScriptCore/ftl/FTLJITCode.h        2013-05-22 16:42:29 UTC (rev 150519)
+++ branches/dfgFourthTier/Source/JavaScriptCore/ftl/FTLJITCode.h        2013-05-22 17:01:01 UTC (rev 150520)
</span><span class="lines">@@ -50,8 +50,11 @@
</span><span class="cx">     bool contains(void*);
</span><span class="cx">     
</span><span class="cx">     void initializeExitThunks(CodeRef);
</span><del>-    void initializeCode(LLVMExecutionEngineRef, CodeRef entrypoint);
</del><ins>+    void addHandle(PassRefPtr&lt;ExecutableMemoryHandle&gt;);
+    void initializeCode(CodeRef entrypoint);
</ins><span class="cx">     
</span><ins>+    const Vector&lt;RefPtr&lt;ExecutableMemoryHandle&gt; &gt;&amp; handles() const { return m_handles; }
+    
</ins><span class="cx">     CodePtr exitThunks();
</span><span class="cx">     
</span><span class="cx">     JITCode* ftl();
</span><span class="lines">@@ -61,10 +64,7 @@
</span><span class="cx">     SegmentedVector&lt;OSRExit, 8&gt; osrExit;
</span><span class="cx">     
</span><span class="cx"> private:
</span><del>-    // FIXME: LLVM should use our own JIT memory allocator, and we shouldn't have to
-    // keep around an LLVMExecutionEngineRef to keep code alive.
-    // https://bugs.webkit.org/show_bug.cgi?id=113619
-    LLVMExecutionEngineRef m_engine;
</del><ins>+    Vector&lt;RefPtr&lt;ExecutableMemoryHandle&gt; &gt; m_handles;
</ins><span class="cx">     CodeRef m_entrypoint;
</span><span class="cx">     CodeRef m_exitThunks;
</span><span class="cx"> };
</span></span></pre></div>
<a id="branchesdfgFourthTierSourceJavaScriptCoreftlFTLJITFinalizercpp"></a>
<div class="modfile"><h4>Modified: branches/dfgFourthTier/Source/JavaScriptCore/ftl/FTLJITFinalizer.cpp (150519 => 150520)</h4>
<pre class="diff"><span>
<span class="info">--- branches/dfgFourthTier/Source/JavaScriptCore/ftl/FTLJITFinalizer.cpp        2013-05-22 16:42:29 UTC (rev 150519)
+++ branches/dfgFourthTier/Source/JavaScriptCore/ftl/FTLJITFinalizer.cpp        2013-05-22 17:01:01 UTC (rev 150520)
</span><span class="lines">@@ -42,8 +42,6 @@
</span><span class="cx"> 
</span><span class="cx"> JITFinalizer::~JITFinalizer()
</span><span class="cx"> {
</span><del>-    if (m_engine)
-        LLVMDisposeExecutionEngine(m_engine);
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool JITFinalizer::finalize(RefPtr&lt;JSC::JITCode&gt;&amp;)
</span><span class="lines">@@ -54,6 +52,11 @@
</span><span class="cx"> 
</span><span class="cx"> bool JITFinalizer::finalizeFunction(RefPtr&lt;JSC::JITCode&gt;&amp; entry, MacroAssemblerCodePtr&amp; withArityCheck)
</span><span class="cx"> {
</span><ins>+    for (unsigned i = m_jitCode-&gt;handles().size(); i--;) {
+        MacroAssembler::cacheFlush(
+            m_jitCode-&gt;handles()[i]-&gt;start(), m_jitCode-&gt;handles()[i]-&gt;sizeInBytes());
+    }
+    
</ins><span class="cx">     if (m_exitThunksLinkBuffer) {
</span><span class="cx">         m_jitCode-&gt;initializeExitThunks(
</span><span class="cx">             FINALIZE_DFG_CODE(
</span><span class="lines">@@ -63,14 +66,11 @@
</span><span class="cx">     
</span><span class="cx">     withArityCheck = m_entrypointLinkBuffer-&gt;locationOf(m_arityCheck);
</span><span class="cx">     m_jitCode-&gt;initializeCode(
</span><del>-        m_engine,
</del><span class="cx">         FINALIZE_DFG_CODE(
</span><span class="cx">             *m_entrypointLinkBuffer,
</span><span class="cx">             (&quot;FTL entrypoint thunk for %s with LLVM generated code at %p&quot;, toCString(CodeBlockWithJITType(m_plan.codeBlock.get(), JITCode::FTLJIT)).data(), m_function)));
</span><span class="cx">     entry = m_jitCode;
</span><span class="cx">     
</span><del>-    m_engine = 0; // We don't own it anymore.
-    
</del><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="branchesdfgFourthTierSourceJavaScriptCoreftlFTLJITFinalizerh"></a>
<div class="modfile"><h4>Modified: branches/dfgFourthTier/Source/JavaScriptCore/ftl/FTLJITFinalizer.h (150519 => 150520)</h4>
<pre class="diff"><span>
<span class="info">--- branches/dfgFourthTier/Source/JavaScriptCore/ftl/FTLJITFinalizer.h        2013-05-22 16:42:29 UTC (rev 150519)
+++ branches/dfgFourthTier/Source/JavaScriptCore/ftl/FTLJITFinalizer.h        2013-05-22 17:01:01 UTC (rev 150520)
</span><span class="lines">@@ -52,10 +52,6 @@
</span><span class="cx">     {
</span><span class="cx">         m_entrypointLinkBuffer = buffer;
</span><span class="cx">     }
</span><del>-    void initializeCode(LLVMExecutionEngineRef engine)
-    {
-        m_engine = engine;
-    }
</del><span class="cx">     void initializeFunction(GeneratedFunction function)
</span><span class="cx">     {
</span><span class="cx">         m_function = function;
</span><span class="lines">@@ -75,7 +71,6 @@
</span><span class="cx"> private:
</span><span class="cx">     OwnPtr&lt;LinkBuffer&gt; m_exitThunksLinkBuffer;
</span><span class="cx">     OwnPtr&lt;LinkBuffer&gt; m_entrypointLinkBuffer;
</span><del>-    LLVMExecutionEngineRef m_engine;
</del><span class="cx">     MacroAssembler::Label m_arityCheck;
</span><span class="cx">     GeneratedFunction m_function;
</span><span class="cx">     RefPtr&lt;JITCode&gt; m_jitCode;
</span></span></pre></div>
<a id="branchesdfgFourthTierSourceJavaScriptCoreftlFTLLinkcpp"></a>
<div class="modfile"><h4>Modified: branches/dfgFourthTier/Source/JavaScriptCore/ftl/FTLLink.cpp (150519 => 150520)</h4>
<pre class="diff"><span>
<span class="info">--- branches/dfgFourthTier/Source/JavaScriptCore/ftl/FTLLink.cpp        2013-05-22 16:42:29 UTC (rev 150519)
+++ branches/dfgFourthTier/Source/JavaScriptCore/ftl/FTLLink.cpp        2013-05-22 17:01:01 UTC (rev 150520)
</span><span class="lines">@@ -122,7 +122,6 @@
</span><span class="cx">     linkBuffer-&gt;link(callArityCheck, state.graph.m_codeBlock-&gt;m_isConstructor ? cti_op_construct_arityCheck : cti_op_call_arityCheck);
</span><span class="cx">     
</span><span class="cx">     state.finalizer-&gt;initializeEntrypointLinkBuffer(linkBuffer.release());
</span><del>-    state.finalizer-&gt;initializeCode(state.engine);
</del><span class="cx">     state.finalizer-&gt;initializeFunction(state.generatedFunction);
</span><span class="cx">     state.finalizer-&gt;initializeArityCheck(arityCheck);
</span><span class="cx">     state.finalizer-&gt;initializeJITCode(state.jitCode);
</span></span></pre></div>
<a id="branchesdfgFourthTierSourceJavaScriptCoreftlFTLStatecpp"></a>
<div class="modfile"><h4>Modified: branches/dfgFourthTier/Source/JavaScriptCore/ftl/FTLState.cpp (150519 => 150520)</h4>
<pre class="diff"><span>
<span class="info">--- branches/dfgFourthTier/Source/JavaScriptCore/ftl/FTLState.cpp        2013-05-22 16:42:29 UTC (rev 150519)
+++ branches/dfgFourthTier/Source/JavaScriptCore/ftl/FTLState.cpp        2013-05-22 17:01:01 UTC (rev 150520)
</span><span class="lines">@@ -40,7 +40,6 @@
</span><span class="cx">     , module(0)
</span><span class="cx">     , function(0)
</span><span class="cx">     , jitCode(adoptRef(new JITCode()))
</span><del>-    , engine(0)
</del><span class="cx">     , generatedFunction(0)
</span><span class="cx"> {
</span><span class="cx">     finalizer = new JITFinalizer(graph.m_plan);
</span></span></pre></div>
<a id="branchesdfgFourthTierSourceJavaScriptCoreftlFTLStateh"></a>
<div class="modfile"><h4>Modified: branches/dfgFourthTier/Source/JavaScriptCore/ftl/FTLState.h (150519 => 150520)</h4>
<pre class="diff"><span>
<span class="info">--- branches/dfgFourthTier/Source/JavaScriptCore/ftl/FTLState.h        2013-05-22 16:42:29 UTC (rev 150519)
+++ branches/dfgFourthTier/Source/JavaScriptCore/ftl/FTLState.h        2013-05-22 17:01:01 UTC (rev 150520)
</span><span class="lines">@@ -53,7 +53,6 @@
</span><span class="cx">     LValue function;
</span><span class="cx">     RefPtr&lt;JITCode&gt; jitCode;
</span><span class="cx">     Vector&lt;OSRExitCompilationInfo&gt; osrExit;
</span><del>-    LLVMExecutionEngineRef engine;
</del><span class="cx">     GeneratedFunction generatedFunction;
</span><span class="cx">     JITFinalizer* finalizer;
</span><span class="cx">     
</span></span></pre>
</div>
</div>

</body>
</html>