<!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>[244608] branches/safari-607-branch</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/244608">244608</a></dd>
<dt>Author</dt> <dd>alancoon@apple.com</dd>
<dt>Date</dt> <dd>2019-04-24 13:32:42 -0700 (Wed, 24 Apr 2019)</dd>
</dl>

<h3>Log Message</h3>
<pre>Revert <a href="http://trac.webkit.org/projects/webkit/changeset/244122">r244122</a>. rdar://problem/50132675</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#branchessafari607branchJSTestsChangeLog">branches/safari-607-branch/JSTests/ChangeLog</a></li>
<li><a href="#branchessafari607branchSourceJavaScriptCoreChangeLog">branches/safari-607-branch/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#branchessafari607branchSourceJavaScriptCoreb3testb3cpp">branches/safari-607-branch/Source/JavaScriptCore/b3/testb3.cpp</a></li>
<li><a href="#branchessafari607branchSourceWTFChangeLog">branches/safari-607-branch/Source/WTF/ChangeLog</a></li>
<li><a href="#branchessafari607branchSourceWTFWTFxcodeprojprojectpbxproj">branches/safari-607-branch/Source/WTF/WTF.xcodeproj/project.pbxproj</a></li>
<li><a href="#branchessafari607branchSourceWTFwtfBackwardsGraphh">branches/safari-607-branch/Source/WTF/wtf/BackwardsGraph.h</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#branchessafari607branchJSTestsstressmapb3licminfiniteloopjs">branches/safari-607-branch/JSTests/stress/map-b3-licm-infinite-loop.js</a></li>
<li><a href="#branchessafari607branchSourceWTFwtfSpanningTreeh">branches/safari-607-branch/Source/WTF/wtf/SpanningTree.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="branchessafari607branchJSTestsChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-607-branch/JSTests/ChangeLog (244607 => 244608)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-607-branch/JSTests/ChangeLog     2019-04-24 20:32:39 UTC (rev 244607)
+++ branches/safari-607-branch/JSTests/ChangeLog        2019-04-24 20:32:42 UTC (rev 244608)
</span><span class="lines">@@ -1,3 +1,7 @@
</span><ins>+2019-04-24  Alan Coon  <alancoon@apple.com>
+
+        Revert r244122. rdar://problem/50132675
+
</ins><span class="cx"> 2019-04-09  Alan Coon  <alancoon@apple.com>
</span><span class="cx"> 
</span><span class="cx">         Cherry-pick r243639. rdar://problem/49725710
</span></span></pre></div>
<a id="branchessafari607branchJSTestsstressmapb3licminfiniteloopjs"></a>
<div class="delfile"><h4>Deleted: branches/safari-607-branch/JSTests/stress/map-b3-licm-infinite-loop.js (244607 => 244608)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-607-branch/JSTests/stress/map-b3-licm-infinite-loop.js   2019-04-24 20:32:39 UTC (rev 244607)
+++ branches/safari-607-branch/JSTests/stress/map-b3-licm-infinite-loop.js      2019-04-24 20:32:42 UTC (rev 244608)
</span><span class="lines">@@ -1,25 +0,0 @@
</span><del>-let count = 0;
-function foo() {
-    ++count;
-    if (count === 1000000)
-        throw new Error;
-}
-noInline(foo);
-
-function test() {
-    let map = new Map();
-
-    let count = 0;
-    for (let i = 1000000 % 0; ; ) {
-        if (!map.has(i)) {
-            map.set(i, i);
-        }
-        foo();
-    }
-
-    return map;
-}
-
-try {
-    test();
-} catch {}
</del></span></pre></div>
<a id="branchessafari607branchSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-607-branch/Source/JavaScriptCore/ChangeLog (244607 => 244608)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-607-branch/Source/JavaScriptCore/ChangeLog       2019-04-24 20:32:39 UTC (rev 244607)
+++ branches/safari-607-branch/Source/JavaScriptCore/ChangeLog  2019-04-24 20:32:42 UTC (rev 244608)
</span><span class="lines">@@ -1,5 +1,9 @@
</span><span class="cx"> 2019-04-24  Alan Coon  <alancoon@apple.com>
</span><span class="cx"> 
</span><ins>+        Revert r244122. rdar://problem/50132675
+
+2019-04-24  Alan Coon  <alancoon@apple.com>
+
</ins><span class="cx">         Revert r244173. rdar://problem/28160396
</span><span class="cx"> 
</span><span class="cx"> 2019-04-24  Alan Coon  <alancoon@apple.com>
</span></span></pre></div>
<a id="branchessafari607branchSourceJavaScriptCoreb3testb3cpp"></a>
<div class="modfile"><h4>Modified: branches/safari-607-branch/Source/JavaScriptCore/b3/testb3.cpp (244607 => 244608)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-607-branch/Source/JavaScriptCore/b3/testb3.cpp   2019-04-24 20:32:39 UTC (rev 244607)
+++ branches/safari-607-branch/Source/JavaScriptCore/b3/testb3.cpp      2019-04-24 20:32:42 UTC (rev 244608)
</span><span class="lines">@@ -16327,51 +16327,6 @@
</span><span class="cx">     compileAndRun<void>(proc);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void testInfiniteLoopDoesntCauseBadHoisting()
-{
-    Procedure proc;
-    if (proc.optLevel() < 2)
-        return;
-    BasicBlock* root = proc.addBlock();
-    BasicBlock* header = proc.addBlock();
-    BasicBlock* loadBlock = proc.addBlock();
-    BasicBlock* postLoadBlock = proc.addBlock();
-
-    Value* arg = root->appendNew<ArgumentRegValue>(proc, Origin(), GPRInfo::argumentGPR0);
-    root->appendNewControlValue(proc, Jump, Origin(), header);
-
-    header->appendNewControlValue(
-        proc, Branch, Origin(),
-        header->appendNew<Value>(proc, Equal, Origin(),
-            arg,
-            header->appendNew<Const64Value>(proc, Origin(), 10)), header, loadBlock);
-
-    PatchpointValue* patchpoint = loadBlock->appendNew<PatchpointValue>(proc, Void, Origin());
-    patchpoint->effects = Effects::none();
-    patchpoint->effects.writesLocalState = true; // Don't DCE this.
-    patchpoint->setGenerator(
-        [&] (CCallHelpers& jit, const StackmapGenerationParams&) {
-            // This works because we don't have callee saves.
-            jit.emitFunctionEpilogue();
-            jit.ret();
-        });
-
-    Value* badLoad = loadBlock->appendNew<MemoryValue>(proc, Load, Int64, Origin(), arg, 0);
-
-    loadBlock->appendNewControlValue(
-        proc, Branch, Origin(),
-        loadBlock->appendNew<Value>(proc, Equal, Origin(),
-            badLoad,
-            loadBlock->appendNew<Const64Value>(proc, Origin(), 45)), header, postLoadBlock);
-
-    postLoadBlock->appendNewControlValue(proc, Return, Origin(), badLoad);
-
-    // The patchpoint early ret() works because we don't have callee saves.
-    auto code = compileProc(proc);
-    RELEASE_ASSERT(!proc.calleeSaveRegisterAtOffsetList().size()); 
-    invoke<void>(*code, static_cast<uint64_t>(55)); // Shouldn't crash dereferncing 55.
-}
-
</del><span class="cx"> // Make sure the compiler does not try to optimize anything out.
</span><span class="cx"> NEVER_INLINE double zero()
</span><span class="cx"> {
</span><span class="lines">@@ -17943,8 +17898,6 @@
</span><span class="cx"> 
</span><span class="cx">     RUN(testLoopWithMultipleHeaderEdges());
</span><span class="cx"> 
</span><del>-    RUN(testInfiniteLoopDoesntCauseBadHoisting());
-
</del><span class="cx">     if (isX86()) {
</span><span class="cx">         RUN(testBranchBitAndImmFusion(Identity, Int64, 1, Air::BranchTest32, Air::Arg::Tmp));
</span><span class="cx">         RUN(testBranchBitAndImmFusion(Identity, Int64, 0xff, Air::BranchTest32, Air::Arg::Tmp));
</span></span></pre></div>
<a id="branchessafari607branchSourceWTFChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-607-branch/Source/WTF/ChangeLog (244607 => 244608)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-607-branch/Source/WTF/ChangeLog  2019-04-24 20:32:39 UTC (rev 244607)
+++ branches/safari-607-branch/Source/WTF/ChangeLog     2019-04-24 20:32:42 UTC (rev 244608)
</span><span class="lines">@@ -1,3 +1,7 @@
</span><ins>+2019-04-24  Alan Coon  <alancoon@apple.com>
+
+        Revert r244122. rdar://problem/50132675
+
</ins><span class="cx"> 2019-04-09  Alan Coon  <alancoon@apple.com>
</span><span class="cx"> 
</span><span class="cx">         Cherry-pick r243639. rdar://problem/49725710
</span></span></pre></div>
<a id="branchessafari607branchSourceWTFWTFxcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: branches/safari-607-branch/Source/WTF/WTF.xcodeproj/project.pbxproj (244607 => 244608)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-607-branch/Source/WTF/WTF.xcodeproj/project.pbxproj      2019-04-24 20:32:39 UTC (rev 244607)
+++ branches/safari-607-branch/Source/WTF/WTF.xcodeproj/project.pbxproj 2019-04-24 20:32:42 UTC (rev 244608)
</span><span class="lines">@@ -388,7 +388,6 @@
</span><span class="cx">          70ECA60A1B02426800449739 /* AtomicStringImpl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AtomicStringImpl.cpp; sourceTree = "<group>"; };
</span><span class="cx">          70ECA60B1B02426800449739 /* SymbolImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SymbolImpl.h; sourceTree = "<group>"; };
</span><span class="cx">          70ECA60C1B02426800449739 /* UniquedStringImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UniquedStringImpl.h; sourceTree = "<group>"; };
</span><del>-               79038E05224B05A7004C0738 /* SpanningTree.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SpanningTree.h; sourceTree = "<group>"; };
</del><span class="cx">           7936D6A91C99F8AE000D1AED /* SmallPtrSet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SmallPtrSet.h; sourceTree = "<group>"; };
</span><span class="cx">          793BFADD9CED44B8B9FBCA16 /* StdUnorderedMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StdUnorderedMap.h; sourceTree = "<group>"; };
</span><span class="cx">          795212021F42588800BD6421 /* SingleRootGraph.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SingleRootGraph.h; sourceTree = "<group>"; };
</span><span class="lines">@@ -1078,7 +1077,6 @@
</span><span class="cx">                          A8A4730C151A825B004123FF /* SizeLimits.cpp */,
</span><span class="cx">                          7936D6A91C99F8AE000D1AED /* SmallPtrSet.h */,
</span><span class="cx">                          A30D412D1F0DE13F00B71954 /* SoftLinking.h */,
</span><del>-                               79038E05224B05A7004C0738 /* SpanningTree.h */,
</del><span class="cx">                           A8A4730D151A825B004123FF /* Spectrum.h */,
</span><span class="cx">                          A8A4730E151A825B004123FF /* StackBounds.cpp */,
</span><span class="cx">                          A8A4730F151A825B004123FF /* StackBounds.h */,
</span></span></pre></div>
<a id="branchessafari607branchSourceWTFwtfBackwardsGraphh"></a>
<div class="modfile"><h4>Modified: branches/safari-607-branch/Source/WTF/wtf/BackwardsGraph.h (244607 => 244608)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-607-branch/Source/WTF/wtf/BackwardsGraph.h       2019-04-24 20:32:39 UTC (rev 244607)
+++ branches/safari-607-branch/Source/WTF/wtf/BackwardsGraph.h  2019-04-24 20:32:42 UTC (rev 244608)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2016-2019 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2016 Apple Inc. All rights reserved.
</ins><span class="cx">  *
</span><span class="cx">  * Redistribution and use in source and binary forms, with or without
</span><span class="cx">  * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -29,7 +29,6 @@
</span><span class="cx"> #include <wtf/GraphNodeWorklist.h>
</span><span class="cx"> #include <wtf/Noncopyable.h>
</span><span class="cx"> #include <wtf/SingleRootGraph.h>
</span><del>-#include <wtf/SpanningTree.h>
</del><span class="cx"> #include <wtf/StdLibExtras.h>
</span><span class="cx"> 
</span><span class="cx"> namespace WTF {
</span><span class="lines">@@ -58,23 +57,6 @@
</span><span class="cx">             }
</span><span class="cx">         };
</span><span class="cx"> 
</span><del>-        {
-            // Loops are a form of terminality (you can loop forever). To have a loop, you need to
-            // have a back edge. An edge u->v is a back edge when u is a descendent of v in the
-            // DFS spanning tree of the Graph.
-            SpanningTree<Graph> spanningTree(graph);
-            for (unsigned i = 0; i < graph.numNodes(); ++i) {
-                if (typename Graph::Node node = graph.node(i)) {
-                    for (typename Graph::Node successor : graph.successors(node)) {
-                        if (spanningTree.isDescendent(node, successor)) {
-                            addRootSuccessor(node);
-                            break;
-                        }
-                    }
-                }
-            }
-        }
-
</del><span class="cx">         for (unsigned i = 0; i < graph.numNodes(); ++i) {
</span><span class="cx">             if (typename Graph::Node node = graph.node(i)) {
</span><span class="cx">                 if (!graph.successors(node).size())
</span></span></pre></div>
<a id="branchessafari607branchSourceWTFwtfSpanningTreeh"></a>
<div class="delfile"><h4>Deleted: branches/safari-607-branch/Source/WTF/wtf/SpanningTree.h (244607 => 244608)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-607-branch/Source/WTF/wtf/SpanningTree.h 2019-04-24 20:32:39 UTC (rev 244607)
+++ branches/safari-607-branch/Source/WTF/wtf/SpanningTree.h    2019-04-24 20:32:42 UTC (rev 244608)
</span><span class="lines">@@ -1,84 +0,0 @@
</span><del>-/*
- * Copyright (C) 2019 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
- */
-
-#pragma once
-
-#include <wtf/GraphNodeWorklist.h>
-
-template<typename Graph>
-class SpanningTree {
-public:
-    SpanningTree(Graph& graph)
-        : m_graph(graph)
-        , m_data(graph.template newMap<Data>())
-    {
-        ExtendedGraphNodeWorklist<typename Graph::Node, unsigned, typename Graph::Set> worklist;
-        worklist.push(m_graph.root(), 0);
-    
-        size_t number = 0;
-
-        while (GraphNodeWith<typename Graph::Node, unsigned> item = worklist.pop()) {
-            typename Graph::Node block = item.node;
-            unsigned successorIndex = item.data;
-        
-            // We initially push with successorIndex = 0 regardless of whether or not we have any
-            // successors. This is so that we can assign our prenumber. Subsequently we get pushed
-            // with higher successorIndex values. We finally push successorIndex == # successors
-            // to calculate our post number.
-            ASSERT(!successorIndex || successorIndex <= m_graph.successors(block).size());
-
-            if (!successorIndex)
-                m_data[block].pre = number++;
-        
-            if (successorIndex < m_graph.successors(block).size()) {
-                unsigned nextSuccessorIndex = successorIndex + 1;
-                // We need to push this even if this is out of bounds so we can compute
-                // the post number.
-                worklist.forcePush(block, nextSuccessorIndex);
-
-                typename Graph::Node successorBlock = m_graph.successors(block)[successorIndex];
-                worklist.push(successorBlock, 0);
-            } else
-                m_data[block].post = number++;
-        }
-    }
-
-    // Returns true if a is a descendent of b.
-    // Note a is a descendent of b if they're equal.
-    bool isDescendent(typename Graph::Node a, typename Graph::Node b)
-    {
-        return m_data[b].pre <= m_data[a].pre
-            && m_data[b].post >= m_data[a].post;
-    }
-
-private:
-    struct Data {
-        size_t pre;
-        size_t post;
-    };
-
-    Graph& m_graph;
-    typename Graph::template Map<Data> m_data;
-};
</del></span></pre>
</div>
</div>

</body>
</html>