<!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>[209146] 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/209146">209146</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2016-11-30 12:30:16 -0800 (Wed, 30 Nov 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Unreviewed, rolling out <a href="http://trac.webkit.org/projects/webkit/changeset/209112">r209112</a>.
https://bugs.webkit.org/show_bug.cgi?id=165208

&quot;It regressed Octane/Raytrace and JetStream&quot; (Requested by
saamyjoon on #webkit).

Reverted changeset:

&quot;We should support CreateThis in the FTL&quot;
https://bugs.webkit.org/show_bug.cgi?id=164904
http://trac.webkit.org/changeset/209112</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCoreftlFTLAbstractHeapRepositoryh">trunk/Source/JavaScriptCore/ftl/FTLAbstractHeapRepository.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreftlFTLCapabilitiescpp">trunk/Source/JavaScriptCore/ftl/FTLCapabilities.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreftlFTLLowerDFGToB3cpp">trunk/Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeStructureh">trunk/Source/JavaScriptCore/runtime/Structure.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (209145 => 209146)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2016-11-30 20:20:32 UTC (rev 209145)
+++ trunk/Source/JavaScriptCore/ChangeLog        2016-11-30 20:30:16 UTC (rev 209146)
</span><span class="lines">@@ -1,3 +1,17 @@
</span><ins>+2016-11-30  Commit Queue  &lt;commit-queue@webkit.org&gt;
+
+        Unreviewed, rolling out r209112.
+        https://bugs.webkit.org/show_bug.cgi?id=165208
+
+        &quot;It regressed Octane/Raytrace and JetStream&quot; (Requested by
+        saamyjoon on #webkit).
+
+        Reverted changeset:
+
+        &quot;We should support CreateThis in the FTL&quot;
+        https://bugs.webkit.org/show_bug.cgi?id=164904
+        http://trac.webkit.org/changeset/209112
+
</ins><span class="cx"> 2016-11-30  Darin Adler  &lt;darin@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Streamline and speed up tokenizer and segmented string classes
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreftlFTLAbstractHeapRepositoryh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ftl/FTLAbstractHeapRepository.h (209145 => 209146)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ftl/FTLAbstractHeapRepository.h        2016-11-30 20:20:32 UTC (rev 209145)
+++ trunk/Source/JavaScriptCore/ftl/FTLAbstractHeapRepository.h        2016-11-30 20:30:16 UTC (rev 209146)
</span><span class="lines">@@ -67,8 +67,6 @@
</span><span class="cx">     macro(JSFunction_executable, JSFunction::offsetOfExecutable()) \
</span><span class="cx">     macro(JSFunction_scope, JSFunction::offsetOfScopeChain()) \
</span><span class="cx">     macro(JSFunction_rareData, JSFunction::offsetOfRareData()) \
</span><del>-    macro(FunctionRareData_allocator, FunctionRareData::offsetOfObjectAllocationProfile() + ObjectAllocationProfile::offsetOfAllocator()) \
-    macro(FunctionRareData_structure, FunctionRareData::offsetOfObjectAllocationProfile() + ObjectAllocationProfile::offsetOfStructure()) \
</del><span class="cx">     macro(JSObject_butterfly, JSObject::butterflyOffset()) \
</span><span class="cx">     macro(JSPropertyNameEnumerator_cachedInlineCapacity, JSPropertyNameEnumerator::cachedInlineCapacityOffset()) \
</span><span class="cx">     macro(JSPropertyNameEnumerator_cachedPropertyNamesVector, JSPropertyNameEnumerator::cachedPropertyNamesVectorOffset()) \
</span><span class="lines">@@ -109,8 +107,6 @@
</span><span class="cx">     macro(Structure_globalObject, Structure::globalObjectOffset()) \
</span><span class="cx">     macro(Structure_prototype, Structure::prototypeOffset()) \
</span><span class="cx">     macro(Structure_structureID, Structure::structureIDOffset()) \
</span><del>-    macro(Structure_inlineCapacity, Structure::inlineCapacityOffset()) \
-    macro(Structure_initializationBlob, Structure::indexingTypeIncludingHistoryOffset()) \
</del><span class="cx">     macro(JSMap_hashMapImpl, JSMap::offsetOfHashMapImpl()) \
</span><span class="cx">     macro(JSSet_hashMapImpl, JSSet::offsetOfHashMapImpl()) \
</span><span class="cx">     macro(HashMapImpl_capacity, HashMapImpl&lt;HashMapBucket&lt;HashMapBucketDataKey&gt;&gt;::offsetOfCapacity()) \
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreftlFTLCapabilitiescpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ftl/FTLCapabilities.cpp (209145 => 209146)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ftl/FTLCapabilities.cpp        2016-11-30 20:20:32 UTC (rev 209145)
+++ trunk/Source/JavaScriptCore/ftl/FTLCapabilities.cpp        2016-11-30 20:30:16 UTC (rev 209146)
</span><span class="lines">@@ -281,7 +281,6 @@
</span><span class="cx">     case CheckDOM:
</span><span class="cx">     case CallDOM:
</span><span class="cx">     case CallDOMGetter:
</span><del>-    case CreateThis:
</del><span class="cx">         // These are OK.
</span><span class="cx">         break;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreftlFTLLowerDFGToB3cpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp (209145 => 209146)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp        2016-11-30 20:20:32 UTC (rev 209145)
+++ trunk/Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp        2016-11-30 20:30:16 UTC (rev 209146)
</span><span class="lines">@@ -1074,9 +1074,6 @@
</span><span class="cx">         case CallDOMGetter:
</span><span class="cx">             compileCallDOMGetter();
</span><span class="cx">             break;
</span><del>-        case CreateThis:
-            compileCreateThis();
-            break;
</del><span class="cx"> 
</span><span class="cx">         case PhantomLocal:
</span><span class="cx">         case LoopHint:
</span><span class="lines">@@ -4921,7 +4918,7 @@
</span><span class="cx">         DFG_ASSERT(m_graph, m_node, allocator);
</span><span class="cx">         
</span><span class="cx">         LValue result = allocateCell(
</span><del>-            m_out.constIntPtr(allocator), m_out.constIntPtr(vm().stringStructure.get()), slowPath);
</del><ins>+            m_out.constIntPtr(allocator), vm().stringStructure.get(), slowPath);
</ins><span class="cx">         
</span><span class="cx">         m_out.storePtr(m_out.intPtrZero, result, m_heaps.JSString_value);
</span><span class="cx">         for (unsigned i = 0; i &lt; numKids; ++i)
</span><span class="lines">@@ -8617,7 +8614,7 @@
</span><span class="cx">                 m_out.store32(vectorLength, fastButterflyValue, m_heaps.Butterfly_vectorLength);
</span><span class="cx">                 
</span><span class="cx">                 LValue fastObjectValue = allocateObject(
</span><del>-                    m_out.constIntPtr(cellAllocator), m_out.constIntPtr(structure), fastButterflyValue, slowPath);
</del><ins>+                    m_out.constIntPtr(cellAllocator), structure, fastButterflyValue, slowPath);
</ins><span class="cx"> 
</span><span class="cx">                 ValueFromBlock fastObject = m_out.anchor(fastObjectValue);
</span><span class="cx">                 ValueFromBlock fastButterfly = m_out.anchor(fastButterflyValue);
</span><span class="lines">@@ -9964,40 +9961,6 @@
</span><span class="cx">         patchpoint-&gt;effects = Effects::forCall();
</span><span class="cx">         setJSValue(patchpoint);
</span><span class="cx">     }
</span><del>-
-    void compileCreateThis()
-    {
-        LValue callee = lowCell(m_node-&gt;child1());
-
-        LBasicBlock isFunctionBlock = m_out.newBlock();
-        LBasicBlock hasRareData = m_out.newBlock();
-        LBasicBlock slowPath = m_out.newBlock();
-        LBasicBlock continuation = m_out.newBlock();
-
-        m_out.branch(isFunction(callee, provenType(m_node-&gt;child1())), usually(isFunctionBlock), rarely(slowPath));
-
-        LBasicBlock lastNext = m_out.appendTo(isFunctionBlock, hasRareData);
-        LValue rareData = m_out.loadPtr(callee, m_heaps.JSFunction_rareData);
-        m_out.branch(m_out.isZero64(rareData), rarely(slowPath), usually(hasRareData));
-
-        m_out.appendTo(hasRareData, slowPath);
-        LValue allocator = m_out.loadPtr(rareData, m_heaps.FunctionRareData_allocator);
-        LValue structure = m_out.loadPtr(rareData, m_heaps.FunctionRareData_structure);
-        LValue butterfly = m_out.constIntPtr(0);
-        ValueFromBlock fastResult = m_out.anchor(allocateObject(allocator, structure, butterfly, slowPath));
-        m_out.jump(continuation);
-
-        m_out.appendTo(slowPath, continuation);
-        ValueFromBlock slowResult = m_out.anchor(vmCall(
-            Int64, m_out.operation(operationCreateThis), m_callFrame, callee, m_out.constInt32(m_node-&gt;inlineCapacity())));
-        m_out.jump(continuation);
-
-        m_out.appendTo(continuation, lastNext);
-        LValue result = m_out.phi(Int64, fastResult, slowResult);
-
-        mutatorFence();
-        setJSValue(result);
-    }
</del><span class="cx">     
</span><span class="cx">     void compareEqObjectOrOtherToObject(Edge leftChild, Edge rightChild)
</span><span class="cx">     {
</span><span class="lines">@@ -10418,24 +10381,16 @@
</span><span class="cx">         m_out.appendTo(continuation, lastNext);
</span><span class="cx">         return patchpoint;
</span><span class="cx">     }
</span><del>-
-    void storeStructure(LValue object, LValue structure)
</del><ins>+    
+    void storeStructure(LValue object, Structure* structure)
</ins><span class="cx">     {
</span><del>-        LValue id;
-        LValue blob;
-        if (structure-&gt;hasIntPtr()) {
-            Structure* actualStructure = bitwise_cast&lt;Structure*&gt;(structure-&gt;asIntPtr());
-            id = m_out.constInt32(actualStructure-&gt;id());
-            blob = m_out.constInt32(actualStructure-&gt;objectInitializationBlob());
-        } else {
-            id = m_out.load32(structure, m_heaps.Structure_structureID);
-            blob = m_out.load32(structure, m_heaps.Structure_initializationBlob);
-        }
-        m_out.store32(id, object, m_heaps.JSCell_structureID);
-        m_out.store32(blob, object, m_heaps.JSCell_usefulBytes);
</del><ins>+        m_out.store32(m_out.constInt32(structure-&gt;id()), object, m_heaps.JSCell_structureID);
+        m_out.store32(
+            m_out.constInt32(structure-&gt;objectInitializationBlob()),
+            object, m_heaps.JSCell_usefulBytes);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><del>-    LValue allocateCell(LValue allocator, LValue structure, LBasicBlock slowPath)
</del><ins>+    LValue allocateCell(LValue allocator, Structure* structure, LBasicBlock slowPath)
</ins><span class="cx">     {
</span><span class="cx">         LValue result = allocateHeapCell(allocator, slowPath);
</span><span class="cx">         storeStructure(result, structure);
</span><span class="lines">@@ -10443,22 +10398,14 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     LValue allocateObject(
</span><del>-        LValue allocator, LValue structure, LValue butterfly, LBasicBlock slowPath)
</del><ins>+        LValue allocator, Structure* structure, LValue butterfly, LBasicBlock slowPath)
</ins><span class="cx">     {
</span><span class="cx">         LValue result = allocateCell(allocator, structure, slowPath);
</span><span class="cx">         if (useGCFences()) {
</span><del>-            LValue start = m_out.constInt32(JSFinalObject::offsetOfInlineStorage() / 8);
-            LValue end;
-            if (structure-&gt;hasIntPtr()) {
-                Structure* actualStructure = bitwise_cast&lt;Structure*&gt;(structure-&gt;asIntPtr());
-                end = m_out.constInt32(JSFinalObject::offsetOfInlineStorage() / 8 + actualStructure-&gt;inlineCapacity());
-            } else
-                end = m_out.add(start, m_out.load8ZeroExt32(structure, m_heaps.Structure_inlineCapacity));
-
</del><span class="cx">             splatWords(
</span><span class="cx">                 result,
</span><del>-                start,
-                end,
</del><ins>+                m_out.constInt32(JSFinalObject::offsetOfInlineStorage() / 8),
+                m_out.constInt32(JSFinalObject::offsetOfInlineStorage() / 8 + structure-&gt;inlineCapacity()),
</ins><span class="cx">                 m_out.int64Zero,
</span><span class="cx">                 m_heaps.properties.atAnyNumber());
</span><span class="cx">         }
</span><span class="lines">@@ -10471,7 +10418,7 @@
</span><span class="cx">         size_t size, Structure* structure, LValue butterfly, LBasicBlock slowPath)
</span><span class="cx">     {
</span><span class="cx">         MarkedAllocator* allocator = vm().heap.allocatorForObjectOfType&lt;ClassType&gt;(size);
</span><del>-        return allocateObject(m_out.constIntPtr(allocator), m_out.constIntPtr(structure), butterfly, slowPath);
</del><ins>+        return allocateObject(m_out.constIntPtr(allocator), structure, butterfly, slowPath);
</ins><span class="cx">     }
</span><span class="cx">     
</span><span class="cx">     template&lt;typename ClassType&gt;
</span><span class="lines">@@ -10535,7 +10482,7 @@
</span><span class="cx">     {
</span><span class="cx">         LValue allocator = allocatorForSize(
</span><span class="cx">             vm().heap.subspaceForObjectOfType&lt;ClassType&gt;(), size, slowPath);
</span><del>-        return allocateObject(allocator, m_out.constIntPtr(structure), butterfly, slowPath);
</del><ins>+        return allocateObject(allocator, structure, butterfly, slowPath);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     template&lt;typename ClassType&gt;
</span><span class="lines">@@ -10544,7 +10491,7 @@
</span><span class="cx">     {
</span><span class="cx">         LValue allocator = allocatorForSize(
</span><span class="cx">             vm().heap.subspaceForObjectOfType&lt;ClassType&gt;(), size, slowPath);
</span><del>-        return allocateCell(allocator, m_out.constIntPtr(structure), slowPath);
</del><ins>+        return allocateCell(allocator, structure, slowPath);
</ins><span class="cx">     }
</span><span class="cx">     
</span><span class="cx">     LValue allocateObject(Structure* structure)
</span><span class="lines">@@ -10562,7 +10509,7 @@
</span><span class="cx">         LBasicBlock lastNext = m_out.insertNewBlocksBefore(slowPath);
</span><span class="cx">         
</span><span class="cx">         ValueFromBlock fastResult = m_out.anchor(allocateObject(
</span><del>-            m_out.constIntPtr(allocator), m_out.constIntPtr(structure), m_out.intPtrZero, slowPath));
</del><ins>+            m_out.constIntPtr(allocator), structure, m_out.intPtrZero, slowPath));
</ins><span class="cx">         
</span><span class="cx">         m_out.jump(continuation);
</span><span class="cx">         
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeStructureh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/Structure.h (209145 => 209146)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/Structure.h        2016-11-30 20:20:32 UTC (rev 209145)
+++ trunk/Source/JavaScriptCore/runtime/Structure.h        2016-11-30 20:30:16 UTC (rev 209146)
</span><span class="lines">@@ -405,11 +405,6 @@
</span><span class="cx">         return OBJECT_OFFSETOF(Structure, m_blob) + StructureIDBlob::structureIDOffset();
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    static ptrdiff_t inlineCapacityOffset()
-    {
-        return OBJECT_OFFSETOF(Structure, m_inlineCapacity);
-    }
-
</del><span class="cx">     static ptrdiff_t prototypeOffset()
</span><span class="cx">     {
</span><span class="cx">         return OBJECT_OFFSETOF(Structure, m_prototype);
</span></span></pre>
</div>
</div>

</body>
</html>