<!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>[190885] trunk/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/190885">190885</a></dd>
<dt>Author</dt> <dd>sbarati@apple.com</dd>
<dt>Date</dt> <dd>2015-10-12 13:37:05 -0700 (Mon, 12 Oct 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Each *ById inline cache in the FTL must have its own CallSiteIndex
https://bugs.webkit.org/show_bug.cgi?id=150039

Reviewed by Geoffrey Garen and Filip Pizlo.

When lowering to LLVM, we create a patchpoint intrinsic for each
*ById in DFG IR. LLVM may choose to duplicate these patchpoints.
Therefore, we want each resulting inline cache to have a unique
CallSiteIndex because each inline cache will have its own set of 
used registers. This change is necessary when we implement try/catch 
in the FTL because an inline cache will ask for the set of used 
registers it will need to restore in the event of an exception 
being thrown. It asks for this set of registers by giving JITCode
a CallSiteIndex. Because each corresponding inline cache that results
from a duplicated patchpoint may all ask this for this set of registers, 
we must assign each inline cache a unique CallSiteIndex.

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::newExceptionHandlingCallSiteIndex):
* dfg/DFGCommonData.cpp:
(JSC::DFG::CommonData::addCodeOrigin):
(JSC::DFG::CommonData::addUniqueCallSiteIndex):
(JSC::DFG::CommonData::addCodeOriginUnconditionally): Deleted.
* dfg/DFGCommonData.h:
* ftl/FTLCompile.cpp:
(JSC::FTL::mmAllocateDataSection):
* ftl/FTLInlineCacheDescriptor.h:
(JSC::FTL::InlineCacheDescriptor::InlineCacheDescriptor):
(JSC::FTL::InlineCacheDescriptor::stackmapID):
(JSC::FTL::InlineCacheDescriptor::codeOrigin):
(JSC::FTL::InlineCacheDescriptor::uid):
(JSC::FTL::GetByIdDescriptor::GetByIdDescriptor):
(JSC::FTL::PutByIdDescriptor::PutByIdDescriptor):
(JSC::FTL::CheckInDescriptor::CheckInDescriptor):
(JSC::FTL::LazySlowPathDescriptor::LazySlowPathDescriptor):
(JSC::FTL::InlineCacheDescriptor::callSiteIndex): Deleted.
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::DFG::LowerDFGToLLVM::compilePutById):
(JSC::FTL::DFG::LowerDFGToLLVM::compileIn):
(JSC::FTL::DFG::LowerDFGToLLVM::getById):
(JSC::FTL::DFG::LowerDFGToLLVM::lazySlowPath):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCorebytecodeCodeBlockcpp">trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGCommonDatacpp">trunk/Source/JavaScriptCore/dfg/DFGCommonData.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGCommonDatah">trunk/Source/JavaScriptCore/dfg/DFGCommonData.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreftlFTLCompilecpp">trunk/Source/JavaScriptCore/ftl/FTLCompile.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreftlFTLInlineCacheDescriptorh">trunk/Source/JavaScriptCore/ftl/FTLInlineCacheDescriptor.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreftlFTLLowerDFGToLLVMcpp">trunk/Source/JavaScriptCore/ftl/FTLLowerDFGToLLVM.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (190884 => 190885)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2015-10-12 20:24:32 UTC (rev 190884)
+++ trunk/Source/JavaScriptCore/ChangeLog        2015-10-12 20:37:05 UTC (rev 190885)
</span><span class="lines">@@ -1,3 +1,47 @@
</span><ins>+2015-10-12  Saam barati  &lt;sbarati@apple.com&gt;
+
+        Each *ById inline cache in the FTL must have its own CallSiteIndex
+        https://bugs.webkit.org/show_bug.cgi?id=150039
+
+        Reviewed by Geoffrey Garen and Filip Pizlo.
+
+        When lowering to LLVM, we create a patchpoint intrinsic for each
+        *ById in DFG IR. LLVM may choose to duplicate these patchpoints.
+        Therefore, we want each resulting inline cache to have a unique
+        CallSiteIndex because each inline cache will have its own set of 
+        used registers. This change is necessary when we implement try/catch 
+        in the FTL because an inline cache will ask for the set of used 
+        registers it will need to restore in the event of an exception 
+        being thrown. It asks for this set of registers by giving JITCode
+        a CallSiteIndex. Because each corresponding inline cache that results
+        from a duplicated patchpoint may all ask this for this set of registers, 
+        we must assign each inline cache a unique CallSiteIndex.
+
+        * bytecode/CodeBlock.cpp:
+        (JSC::CodeBlock::newExceptionHandlingCallSiteIndex):
+        * dfg/DFGCommonData.cpp:
+        (JSC::DFG::CommonData::addCodeOrigin):
+        (JSC::DFG::CommonData::addUniqueCallSiteIndex):
+        (JSC::DFG::CommonData::addCodeOriginUnconditionally): Deleted.
+        * dfg/DFGCommonData.h:
+        * ftl/FTLCompile.cpp:
+        (JSC::FTL::mmAllocateDataSection):
+        * ftl/FTLInlineCacheDescriptor.h:
+        (JSC::FTL::InlineCacheDescriptor::InlineCacheDescriptor):
+        (JSC::FTL::InlineCacheDescriptor::stackmapID):
+        (JSC::FTL::InlineCacheDescriptor::codeOrigin):
+        (JSC::FTL::InlineCacheDescriptor::uid):
+        (JSC::FTL::GetByIdDescriptor::GetByIdDescriptor):
+        (JSC::FTL::PutByIdDescriptor::PutByIdDescriptor):
+        (JSC::FTL::CheckInDescriptor::CheckInDescriptor):
+        (JSC::FTL::LazySlowPathDescriptor::LazySlowPathDescriptor):
+        (JSC::FTL::InlineCacheDescriptor::callSiteIndex): Deleted.
+        * ftl/FTLLowerDFGToLLVM.cpp:
+        (JSC::FTL::DFG::LowerDFGToLLVM::compilePutById):
+        (JSC::FTL::DFG::LowerDFGToLLVM::compileIn):
+        (JSC::FTL::DFG::LowerDFGToLLVM::getById):
+        (JSC::FTL::DFG::LowerDFGToLLVM::lazySlowPath):
+
</ins><span class="cx"> 2015-10-12  Andreas Kling  &lt;akling@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         &quot;A + B&quot; with strings shouldn't copy if A or B is empty.
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebytecodeCodeBlockcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp (190884 => 190885)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp        2015-10-12 20:24:32 UTC (rev 190884)
+++ trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp        2015-10-12 20:37:05 UTC (rev 190885)
</span><span class="lines">@@ -2951,7 +2951,7 @@
</span><span class="cx">     RELEASE_ASSERT(canGetCodeOrigin(originalCallSite));
</span><span class="cx">     ASSERT(!!handlerForIndex(originalCallSite.bits()));
</span><span class="cx">     CodeOrigin originalOrigin = codeOrigin(originalCallSite);
</span><del>-    return m_jitCode-&gt;dfgCommon()-&gt;addCodeOriginUnconditionally(originalOrigin);
</del><ins>+    return m_jitCode-&gt;dfgCommon()-&gt;addUniqueCallSiteIndex(originalOrigin);
</ins><span class="cx"> #else
</span><span class="cx">     // We never create new on-the-fly exception handling
</span><span class="cx">     // call sites outside the DFG/FTL inline caches.
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGCommonDatacpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGCommonData.cpp (190884 => 190885)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGCommonData.cpp        2015-10-12 20:24:32 UTC (rev 190884)
+++ trunk/Source/JavaScriptCore/dfg/DFGCommonData.cpp        2015-10-12 20:37:05 UTC (rev 190885)
</span><span class="lines">@@ -57,7 +57,7 @@
</span><span class="cx">     return CallSiteIndex(index);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-CallSiteIndex CommonData::addCodeOriginUnconditionally(CodeOrigin codeOrigin)
</del><ins>+CallSiteIndex CommonData::addUniqueCallSiteIndex(CodeOrigin codeOrigin)
</ins><span class="cx"> {
</span><span class="cx">     if (callSiteIndexFreeList.size())
</span><span class="cx">         return CallSiteIndex(callSiteIndexFreeList.takeAny());
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGCommonDatah"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGCommonData.h (190884 => 190885)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGCommonData.h        2015-10-12 20:24:32 UTC (rev 190884)
+++ trunk/Source/JavaScriptCore/dfg/DFGCommonData.h        2015-10-12 20:37:05 UTC (rev 190885)
</span><span class="lines">@@ -80,7 +80,7 @@
</span><span class="cx">     
</span><span class="cx">     void notifyCompilingStructureTransition(Plan&amp;, CodeBlock*, Node*);
</span><span class="cx">     CallSiteIndex addCodeOrigin(CodeOrigin);
</span><del>-    CallSiteIndex addCodeOriginUnconditionally(CodeOrigin);
</del><ins>+    CallSiteIndex addUniqueCallSiteIndex(CodeOrigin);
</ins><span class="cx">     CallSiteIndex lastCallSite() const;
</span><span class="cx">     void removeCallSiteIndex(CallSiteIndex);
</span><span class="cx">     
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreftlFTLCompilecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ftl/FTLCompile.cpp (190884 => 190885)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ftl/FTLCompile.cpp        2015-10-12 20:24:32 UTC (rev 190884)
+++ trunk/Source/JavaScriptCore/ftl/FTLCompile.cpp        2015-10-12 20:37:05 UTC (rev 190885)
</span><span class="lines">@@ -459,7 +459,7 @@
</span><span class="cx">                 continue;
</span><span class="cx">             }
</span><span class="cx">             
</span><del>-            CodeOrigin codeOrigin = state.jitCode-&gt;common.codeOrigins[getById.callSiteIndex().bits()];
</del><ins>+            CodeOrigin codeOrigin = getById.codeOrigin();
</ins><span class="cx">             for (unsigned i = 0; i &lt; iter-&gt;value.size(); ++i) {
</span><span class="cx">                 StackMaps::Record&amp; record = iter-&gt;value[i];
</span><span class="cx">             
</span><span class="lines">@@ -469,7 +469,7 @@
</span><span class="cx">                 GPRReg base = record.locations[1].directGPR();
</span><span class="cx">                 
</span><span class="cx">                 JITGetByIdGenerator gen(
</span><del>-                    codeBlock, codeOrigin, getById.callSiteIndex(), usedRegisters, JSValueRegs(base),
</del><ins>+                    codeBlock, codeOrigin, state.jitCode-&gt;common.addUniqueCallSiteIndex(codeOrigin), usedRegisters, JSValueRegs(base),
</ins><span class="cx">                     JSValueRegs(result));
</span><span class="cx">                 
</span><span class="cx">                 MacroAssembler::Label begin = slowPathJIT.label();
</span><span class="lines">@@ -498,7 +498,7 @@
</span><span class="cx">                 continue;
</span><span class="cx">             }
</span><span class="cx">             
</span><del>-            CodeOrigin codeOrigin = state.jitCode-&gt;common.codeOrigins[putById.callSiteIndex().bits()];
</del><ins>+            CodeOrigin codeOrigin = putById.codeOrigin();
</ins><span class="cx">             for (unsigned i = 0; i &lt; iter-&gt;value.size(); ++i) {
</span><span class="cx">                 StackMaps::Record&amp; record = iter-&gt;value[i];
</span><span class="cx">                 
</span><span class="lines">@@ -508,7 +508,7 @@
</span><span class="cx">                 GPRReg value = record.locations[1].directGPR();
</span><span class="cx">                 
</span><span class="cx">                 JITPutByIdGenerator gen(
</span><del>-                    codeBlock, codeOrigin, putById.callSiteIndex(), usedRegisters, JSValueRegs(base),
</del><ins>+                    codeBlock, codeOrigin, state.jitCode-&gt;common.addUniqueCallSiteIndex(codeOrigin), usedRegisters, JSValueRegs(base),
</ins><span class="cx">                     JSValueRegs(value), GPRInfo::patchpointScratchRegister, putById.ecmaMode(), putById.putKind());
</span><span class="cx">                 
</span><span class="cx">                 MacroAssembler::Label begin = slowPathJIT.label();
</span><span class="lines">@@ -538,7 +538,7 @@
</span><span class="cx">                 continue;
</span><span class="cx">             }
</span><span class="cx">             
</span><del>-            CodeOrigin codeOrigin = state.jitCode-&gt;common.codeOrigins[checkIn.callSiteIndex().bits()];
</del><ins>+            CodeOrigin codeOrigin = checkIn.codeOrigin();
</ins><span class="cx">             for (unsigned i = 0; i &lt; iter-&gt;value.size(); ++i) {
</span><span class="cx">                 StackMaps::Record&amp; record = iter-&gt;value[i];
</span><span class="cx">                 RegisterSet usedRegisters = usedRegistersFor(record);
</span><span class="lines">@@ -546,7 +546,7 @@
</span><span class="cx">                 GPRReg obj = record.locations[1].directGPR();
</span><span class="cx">                 StructureStubInfo* stubInfo = codeBlock-&gt;addStubInfo(AccessType::In); 
</span><span class="cx">                 stubInfo-&gt;codeOrigin = codeOrigin;
</span><del>-                stubInfo-&gt;callSiteIndex = checkIn.callSiteIndex();
</del><ins>+                stubInfo-&gt;callSiteIndex = state.jitCode-&gt;common.addUniqueCallSiteIndex(codeOrigin);
</ins><span class="cx">                 stubInfo-&gt;patch.baseGPR = static_cast&lt;int8_t&gt;(obj);
</span><span class="cx">                 stubInfo-&gt;patch.valueGPR = static_cast&lt;int8_t&gt;(result);
</span><span class="cx">                 stubInfo-&gt;patch.usedRegisters = usedRegisters;
</span><span class="lines">@@ -575,7 +575,7 @@
</span><span class="cx">                 // It was optimized out.
</span><span class="cx">                 continue;
</span><span class="cx">             }
</span><del>-
</del><ins>+            CodeOrigin codeOrigin = descriptor.codeOrigin();
</ins><span class="cx">             for (unsigned i = 0; i &lt; iter-&gt;value.size(); ++i) {
</span><span class="cx">                 StackMaps::Record&amp; record = iter-&gt;value[i];
</span><span class="cx">                 RegisterSet usedRegisters = usedRegistersFor(record);
</span><span class="lines">@@ -590,7 +590,7 @@
</span><span class="cx">                     state.finalizer-&gt;handleExceptionsLinkBuffer-&gt;entrypoint();
</span><span class="cx"> 
</span><span class="cx">                 std::unique_ptr&lt;LazySlowPath&gt; lazySlowPath = std::make_unique&lt;LazySlowPath&gt;(
</span><del>-                    patchpoint, exceptionTarget, usedRegisters, descriptor.callSiteIndex(),
</del><ins>+                    patchpoint, exceptionTarget, usedRegisters, state.jitCode-&gt;common.addUniqueCallSiteIndex(codeOrigin),
</ins><span class="cx">                     descriptor.m_linker-&gt;run(locations));
</span><span class="cx"> 
</span><span class="cx">                 CCallHelpers::Label begin = slowPathJIT.label();
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreftlFTLInlineCacheDescriptorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ftl/FTLInlineCacheDescriptor.h (190884 => 190885)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ftl/FTLInlineCacheDescriptor.h        2015-10-12 20:24:32 UTC (rev 190884)
+++ trunk/Source/JavaScriptCore/ftl/FTLInlineCacheDescriptor.h        2015-10-12 20:37:05 UTC (rev 190885)
</span><span class="lines">@@ -41,23 +41,22 @@
</span><span class="cx"> class InlineCacheDescriptor {
</span><span class="cx"> public:
</span><span class="cx">     InlineCacheDescriptor() 
</span><del>-        : m_callSiteIndex(UINT_MAX) 
</del><span class="cx">     { }
</span><span class="cx">     
</span><del>-    InlineCacheDescriptor(unsigned stackmapID, CallSiteIndex callSite, UniquedStringImpl* uid)
</del><ins>+    InlineCacheDescriptor(unsigned stackmapID, CodeOrigin codeOrigin, UniquedStringImpl* uid)
</ins><span class="cx">         : m_stackmapID(stackmapID)
</span><del>-        , m_callSiteIndex(callSite)
</del><ins>+        , m_codeOrigin(codeOrigin)
</ins><span class="cx">         , m_uid(uid)
</span><span class="cx">     {
</span><span class="cx">     }
</span><span class="cx">     
</span><span class="cx">     unsigned stackmapID() const { return m_stackmapID; }
</span><del>-    CallSiteIndex callSiteIndex() const { return m_callSiteIndex; }
</del><ins>+    CodeOrigin codeOrigin() const { return m_codeOrigin; }
</ins><span class="cx">     UniquedStringImpl* uid() const { return m_uid; }
</span><span class="cx">     
</span><span class="cx"> private:
</span><span class="cx">     unsigned m_stackmapID;
</span><del>-    CallSiteIndex m_callSiteIndex;
</del><ins>+    CodeOrigin m_codeOrigin;
</ins><span class="cx">     UniquedStringImpl* m_uid;
</span><span class="cx">     
</span><span class="cx"> public:
</span><span class="lines">@@ -68,8 +67,8 @@
</span><span class="cx"> public:
</span><span class="cx">     GetByIdDescriptor() { }
</span><span class="cx">     
</span><del>-    GetByIdDescriptor(unsigned stackmapID, CallSiteIndex callSite, UniquedStringImpl* uid)
-        : InlineCacheDescriptor(stackmapID, callSite, uid)
</del><ins>+    GetByIdDescriptor(unsigned stackmapID, CodeOrigin codeOrigin, UniquedStringImpl* uid)
+        : InlineCacheDescriptor(stackmapID, codeOrigin, uid)
</ins><span class="cx">     {
</span><span class="cx">     }
</span><span class="cx">     
</span><span class="lines">@@ -81,9 +80,9 @@
</span><span class="cx">     PutByIdDescriptor() { }
</span><span class="cx">     
</span><span class="cx">     PutByIdDescriptor(
</span><del>-        unsigned stackmapID, CallSiteIndex callSite, UniquedStringImpl* uid,
</del><ins>+        unsigned stackmapID, CodeOrigin codeOrigin, UniquedStringImpl* uid,
</ins><span class="cx">         ECMAMode ecmaMode, PutKind putKind)
</span><del>-        : InlineCacheDescriptor(stackmapID, callSite, uid)
</del><ins>+        : InlineCacheDescriptor(stackmapID, codeOrigin, uid)
</ins><span class="cx">         , m_ecmaMode(ecmaMode)
</span><span class="cx">         , m_putKind(putKind)
</span><span class="cx">     {
</span><span class="lines">@@ -116,8 +115,8 @@
</span><span class="cx"> public:
</span><span class="cx">     CheckInDescriptor() { }
</span><span class="cx">     
</span><del>-    CheckInDescriptor(unsigned stackmapID, CallSiteIndex callSite, UniquedStringImpl* uid)
-        : InlineCacheDescriptor(stackmapID, callSite, uid)
</del><ins>+    CheckInDescriptor(unsigned stackmapID, CodeOrigin codeOrigin, UniquedStringImpl* uid)
+        : InlineCacheDescriptor(stackmapID, codeOrigin, uid)
</ins><span class="cx">     {
</span><span class="cx">     }
</span><span class="cx">     
</span><span class="lines">@@ -145,9 +144,9 @@
</span><span class="cx">     LazySlowPathDescriptor() { }
</span><span class="cx"> 
</span><span class="cx">     LazySlowPathDescriptor(
</span><del>-        unsigned stackmapID, CallSiteIndex callSite,
</del><ins>+        unsigned stackmapID, CodeOrigin codeOrigin,
</ins><span class="cx">         RefPtr&lt;LazySlowPathLinkerTask&gt; linker)
</span><del>-        : InlineCacheDescriptor(stackmapID, callSite, nullptr)
</del><ins>+        : InlineCacheDescriptor(stackmapID, codeOrigin, nullptr)
</ins><span class="cx">         , m_linker(linker)
</span><span class="cx">     {
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreftlFTLLowerDFGToLLVMcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ftl/FTLLowerDFGToLLVM.cpp (190884 => 190885)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ftl/FTLLowerDFGToLLVM.cpp        2015-10-12 20:24:32 UTC (rev 190884)
+++ trunk/Source/JavaScriptCore/ftl/FTLLowerDFGToLLVM.cpp        2015-10-12 20:37:05 UTC (rev 190885)
</span><span class="lines">@@ -2275,7 +2275,7 @@
</span><span class="cx">         setInstructionCallingConvention(call, LLVMAnyRegCallConv);
</span><span class="cx">         
</span><span class="cx">         m_ftlState.putByIds.append(PutByIdDescriptor(
</span><del>-            stackmapID, m_ftlState.jitCode-&gt;common.addCodeOrigin(m_node-&gt;origin.semantic), uid,
</del><ins>+            stackmapID, m_node-&gt;origin.semantic, uid,
</ins><span class="cx">             m_graph.executableFor(m_node-&gt;origin.semantic)-&gt;ecmaMode(),
</span><span class="cx">             m_node-&gt;op() == PutByIdDirect ? Direct : NotDirect));
</span><span class="cx">     }
</span><span class="lines">@@ -5126,7 +5126,7 @@
</span><span class="cx"> 
</span><span class="cx">                 setInstructionCallingConvention(call, LLVMAnyRegCallConv);
</span><span class="cx"> 
</span><del>-                m_ftlState.checkIns.append(CheckInDescriptor(stackmapID, m_ftlState.jitCode-&gt;common.addCodeOrigin(m_node-&gt;origin.semantic), str));
</del><ins>+                m_ftlState.checkIns.append(CheckInDescriptor(stackmapID, m_node-&gt;origin.semantic, str));
</ins><span class="cx">                 setJSValue(call);
</span><span class="cx">                 return;
</span><span class="cx">             }
</span><span class="lines">@@ -6116,7 +6116,7 @@
</span><span class="cx">             constNull(m_out.ref8), m_out.constInt32(1), base);
</span><span class="cx">         setInstructionCallingConvention(call, LLVMAnyRegCallConv);
</span><span class="cx">         
</span><del>-        m_ftlState.getByIds.append(GetByIdDescriptor(stackmapID, m_ftlState.jitCode-&gt;common.addCodeOrigin(m_node-&gt;origin.semantic), uid));
</del><ins>+        m_ftlState.getByIds.append(GetByIdDescriptor(stackmapID, m_node-&gt;origin.semantic, uid));
</ins><span class="cx">         
</span><span class="cx">         return call;
</span><span class="cx">     }
</span><span class="lines">@@ -7344,14 +7344,11 @@
</span><span class="cx">         arguments.appendVector(userArguments);
</span><span class="cx">         LValue call = m_out.call(m_out.patchpointInt64Intrinsic(), arguments);
</span><span class="cx">         setInstructionCallingConvention(call, LLVMAnyRegCallConv);
</span><del>-
-        CallSiteIndex callSiteIndex =
-            m_ftlState.jitCode-&gt;common.addCodeOrigin(m_node-&gt;origin.semantic);
</del><span class="cx">         
</span><span class="cx">         RefPtr&lt;LazySlowPathLinkerTask&gt; linker =
</span><span class="cx">             createSharedTask&lt;LazySlowPathLinkerFunction&gt;(functor);
</span><span class="cx"> 
</span><del>-        m_ftlState.lazySlowPaths.append(LazySlowPathDescriptor(stackmapID, callSiteIndex, linker));
</del><ins>+        m_ftlState.lazySlowPaths.append(LazySlowPathDescriptor(stackmapID, m_node-&gt;origin.semantic, linker));
</ins><span class="cx"> 
</span><span class="cx">         return call;
</span><span class="cx">     }
</span></span></pre>
</div>
</div>

</body>
</html>