<!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>[179840] 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/179840">179840</a></dd>
<dt>Author</dt> <dd>fpizlo@apple.com</dd>
<dt>Date</dt> <dd>2015-02-09 11:57:41 -0800 (Mon, 09 Feb 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>DFG should only have two mechanisms for describing effectfulness of nodes; previously there were three
https://bugs.webkit.org/show_bug.cgi?id=141369

Reviewed by Michael Saboff.

We previously used the NodeMightClobber and NodeClobbersWorld NodeFlags to describe
effectfulness.  Starting over a year ago, we introduced a more powerful mechanism - the
DFG::clobberize() function.  Now we only have one remaining client of the old NodeFlags,
and everyone else uses DFG::clobberize().  We should get rid of those NodeFlags and
finally switch everyone over to DFG::clobberize().
        
Unfortunately there is still another place where effectfulness of nodes is described: the
AbstractInterpreter. This is because the AbstractInterpreter has special tuning both for
compile time performance and there are places where the AI is more precise than
clobberize() because of its flow-sensitivity.
        
This means that after this change there will be only two places, rather than three, where
the effectfulness of a node has to be described:

- DFG::clobberize()
- DFG::AbstractInterpreter

* dfg/DFGClobberize.cpp:
(JSC::DFG::clobbersWorld):
* dfg/DFGClobberize.h:
* dfg/DFGDoesGC.cpp:
(JSC::DFG::doesGC):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
(JSC::DFG::FixupPhase::attemptToMakeGetTypedArrayByteLength):
(JSC::DFG::FixupPhase::convertToGetArrayLength):
(JSC::DFG::FixupPhase::attemptToMakeGetTypedArrayByteOffset):
* dfg/DFGGraph.h:
(JSC::DFG::Graph::isPredictedNumerical): Deleted.
(JSC::DFG::Graph::byValIsPure): Deleted.
(JSC::DFG::Graph::clobbersWorld): Deleted.
* dfg/DFGNode.h:
(JSC::DFG::Node::convertToConstant):
(JSC::DFG::Node::convertToGetLocalUnlinked):
(JSC::DFG::Node::convertToGetByOffset):
(JSC::DFG::Node::convertToMultiGetByOffset):
(JSC::DFG::Node::convertToPutByOffset):
(JSC::DFG::Node::convertToMultiPutByOffset):
* dfg/DFGNodeFlags.cpp:
(JSC::DFG::dumpNodeFlags):
* dfg/DFGNodeFlags.h:
* dfg/DFGNodeType.h:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGClobberizecpp">trunk/Source/JavaScriptCore/dfg/DFGClobberize.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGClobberizeh">trunk/Source/JavaScriptCore/dfg/DFGClobberize.h</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGDoesGCcpp">trunk/Source/JavaScriptCore/dfg/DFGDoesGC.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGFixupPhasecpp">trunk/Source/JavaScriptCore/dfg/DFGFixupPhase.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGGraphh">trunk/Source/JavaScriptCore/dfg/DFGGraph.h</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGNodeh">trunk/Source/JavaScriptCore/dfg/DFGNode.h</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGNodeFlagscpp">trunk/Source/JavaScriptCore/dfg/DFGNodeFlags.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGNodeFlagsh">trunk/Source/JavaScriptCore/dfg/DFGNodeFlags.h</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGNodeTypeh">trunk/Source/JavaScriptCore/dfg/DFGNodeType.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (179839 => 179840)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2015-02-09 19:53:28 UTC (rev 179839)
+++ trunk/Source/JavaScriptCore/ChangeLog        2015-02-09 19:57:41 UTC (rev 179840)
</span><span class="lines">@@ -1,3 +1,53 @@
</span><ins>+2015-02-08  Filip Pizlo  &lt;fpizlo@apple.com&gt;
+
+        DFG should only have two mechanisms for describing effectfulness of nodes; previously there were three
+        https://bugs.webkit.org/show_bug.cgi?id=141369
+
+        Reviewed by Michael Saboff.
+
+        We previously used the NodeMightClobber and NodeClobbersWorld NodeFlags to describe
+        effectfulness.  Starting over a year ago, we introduced a more powerful mechanism - the
+        DFG::clobberize() function.  Now we only have one remaining client of the old NodeFlags,
+        and everyone else uses DFG::clobberize().  We should get rid of those NodeFlags and
+        finally switch everyone over to DFG::clobberize().
+        
+        Unfortunately there is still another place where effectfulness of nodes is described: the
+        AbstractInterpreter. This is because the AbstractInterpreter has special tuning both for
+        compile time performance and there are places where the AI is more precise than
+        clobberize() because of its flow-sensitivity.
+        
+        This means that after this change there will be only two places, rather than three, where
+        the effectfulness of a node has to be described:
+
+        - DFG::clobberize()
+        - DFG::AbstractInterpreter
+
+        * dfg/DFGClobberize.cpp:
+        (JSC::DFG::clobbersWorld):
+        * dfg/DFGClobberize.h:
+        * dfg/DFGDoesGC.cpp:
+        (JSC::DFG::doesGC):
+        * dfg/DFGFixupPhase.cpp:
+        (JSC::DFG::FixupPhase::fixupNode):
+        (JSC::DFG::FixupPhase::attemptToMakeGetTypedArrayByteLength):
+        (JSC::DFG::FixupPhase::convertToGetArrayLength):
+        (JSC::DFG::FixupPhase::attemptToMakeGetTypedArrayByteOffset):
+        * dfg/DFGGraph.h:
+        (JSC::DFG::Graph::isPredictedNumerical): Deleted.
+        (JSC::DFG::Graph::byValIsPure): Deleted.
+        (JSC::DFG::Graph::clobbersWorld): Deleted.
+        * dfg/DFGNode.h:
+        (JSC::DFG::Node::convertToConstant):
+        (JSC::DFG::Node::convertToGetLocalUnlinked):
+        (JSC::DFG::Node::convertToGetByOffset):
+        (JSC::DFG::Node::convertToMultiGetByOffset):
+        (JSC::DFG::Node::convertToPutByOffset):
+        (JSC::DFG::Node::convertToMultiPutByOffset):
+        * dfg/DFGNodeFlags.cpp:
+        (JSC::DFG::dumpNodeFlags):
+        * dfg/DFGNodeFlags.h:
+        * dfg/DFGNodeType.h:
+
</ins><span class="cx"> 2015-02-09  Csaba Osztrogon√°c  &lt;ossy@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         Fix the !ENABLE(DFG_JIT) build
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGClobberizecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGClobberize.cpp (179839 => 179840)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGClobberize.cpp        2015-02-09 19:53:28 UTC (rev 179839)
+++ trunk/Source/JavaScriptCore/dfg/DFGClobberize.cpp        2015-02-09 19:57:41 UTC (rev 179840)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2013, 2014 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2013-2015 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">@@ -56,6 +56,19 @@
</span><span class="cx">     return addWrite.result();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+bool clobbersWorld(Graph&amp; graph, Node* node)
+{
+    bool result = false;
+    clobberize(
+        graph, node, NoOpClobberize(),
+        [&amp;] (AbstractHeap heap) {
+            if (heap == AbstractHeap(World))
+                result = true;
+        },
+        NoOpClobberize());
+    return result;
+}
+
</ins><span class="cx"> } } // namespace JSC::DFG
</span><span class="cx"> 
</span><span class="cx"> #endif // ENABLE(DFG_JIT)
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGClobberizeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGClobberize.h (179839 => 179840)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGClobberize.h        2015-02-09 19:53:28 UTC (rev 179839)
+++ trunk/Source/JavaScriptCore/dfg/DFGClobberize.h        2015-02-09 19:57:41 UTC (rev 179840)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2013, 2014 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2013-2015 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">@@ -934,6 +934,8 @@
</span><span class="cx"> bool accessesOverlap(Graph&amp;, Node*, AbstractHeap);
</span><span class="cx"> bool writesOverlap(Graph&amp;, Node*, AbstractHeap);
</span><span class="cx"> 
</span><ins>+bool clobbersWorld(Graph&amp;, Node*);
+
</ins><span class="cx"> // We would have used bind() for these, but because of the overlaoding that we are doing,
</span><span class="cx"> // it's quite a bit of clearer to just write this out the traditional way.
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGDoesGCcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGDoesGC.cpp (179839 => 179840)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGDoesGC.cpp        2015-02-09 19:53:28 UTC (rev 179839)
+++ trunk/Source/JavaScriptCore/dfg/DFGDoesGC.cpp        2015-02-09 19:57:41 UTC (rev 179840)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2014 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2014, 2015 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">@@ -28,6 +28,7 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(DFG_JIT)
</span><span class="cx"> 
</span><ins>+#include &quot;DFGClobberize.h&quot;
</ins><span class="cx"> #include &quot;DFGGraph.h&quot;
</span><span class="cx"> #include &quot;DFGNode.h&quot;
</span><span class="cx"> #include &quot;Operations.h&quot;
</span><span class="lines">@@ -36,7 +37,7 @@
</span><span class="cx"> 
</span><span class="cx"> bool doesGC(Graph&amp; graph, Node* node)
</span><span class="cx"> {
</span><del>-    if (graph.clobbersWorld(node))
</del><ins>+    if (clobbersWorld(graph, node))
</ins><span class="cx">         return true;
</span><span class="cx">     
</span><span class="cx">     // Now consider nodes that don't clobber the world but that still may GC. This includes all
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGFixupPhasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGFixupPhase.cpp (179839 => 179840)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGFixupPhase.cpp        2015-02-09 19:53:28 UTC (rev 179839)
+++ trunk/Source/JavaScriptCore/dfg/DFGFixupPhase.cpp        2015-02-09 19:57:41 UTC (rev 179840)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2012, 2013, 2014 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2012-2015 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">@@ -161,14 +161,14 @@
</span><span class="cx">         case ValueAdd: {
</span><span class="cx">             if (attemptToMakeIntegerAdd(node)) {
</span><span class="cx">                 node-&gt;setOp(ArithAdd);
</span><del>-                node-&gt;clearFlags(NodeMustGenerate | NodeClobbersWorld);
</del><ins>+                node-&gt;clearFlags(NodeMustGenerate);
</ins><span class="cx">                 break;
</span><span class="cx">             }
</span><span class="cx">             if (Node::shouldSpeculateNumberOrBooleanExpectingDefined(node-&gt;child1().node(), node-&gt;child2().node())) {
</span><span class="cx">                 fixDoubleOrBooleanEdge(node-&gt;child1());
</span><span class="cx">                 fixDoubleOrBooleanEdge(node-&gt;child2());
</span><span class="cx">                 node-&gt;setOp(ArithAdd);
</span><del>-                node-&gt;clearFlags(NodeMustGenerate | NodeClobbersWorld);
</del><ins>+                node-&gt;clearFlags(NodeMustGenerate);
</ins><span class="cx">                 node-&gt;setResult(NodeResultDouble);
</span><span class="cx">                 break;
</span><span class="cx">             }
</span><span class="lines">@@ -382,26 +382,26 @@
</span><span class="cx">                 &amp;&amp; Node::shouldSpeculateBoolean(node-&gt;child1().node(), node-&gt;child2().node())) {
</span><span class="cx">                 fixEdge&lt;BooleanUse&gt;(node-&gt;child1());
</span><span class="cx">                 fixEdge&lt;BooleanUse&gt;(node-&gt;child2());
</span><del>-                node-&gt;clearFlags(NodeMustGenerate | NodeClobbersWorld);
</del><ins>+                node-&gt;clearFlags(NodeMustGenerate);
</ins><span class="cx">                 break;
</span><span class="cx">             }
</span><span class="cx">             if (Node::shouldSpeculateInt32OrBoolean(node-&gt;child1().node(), node-&gt;child2().node())) {
</span><span class="cx">                 fixIntOrBooleanEdge(node-&gt;child1());
</span><span class="cx">                 fixIntOrBooleanEdge(node-&gt;child2());
</span><del>-                node-&gt;clearFlags(NodeMustGenerate | NodeClobbersWorld);
</del><ins>+                node-&gt;clearFlags(NodeMustGenerate);
</ins><span class="cx">                 break;
</span><span class="cx">             }
</span><span class="cx">             if (enableInt52()
</span><span class="cx">                 &amp;&amp; Node::shouldSpeculateMachineInt(node-&gt;child1().node(), node-&gt;child2().node())) {
</span><span class="cx">                 fixEdge&lt;Int52RepUse&gt;(node-&gt;child1());
</span><span class="cx">                 fixEdge&lt;Int52RepUse&gt;(node-&gt;child2());
</span><del>-                node-&gt;clearFlags(NodeMustGenerate | NodeClobbersWorld);
</del><ins>+                node-&gt;clearFlags(NodeMustGenerate);
</ins><span class="cx">                 break;
</span><span class="cx">             }
</span><span class="cx">             if (Node::shouldSpeculateNumberOrBoolean(node-&gt;child1().node(), node-&gt;child2().node())) {
</span><span class="cx">                 fixDoubleOrBooleanEdge(node-&gt;child1());
</span><span class="cx">                 fixDoubleOrBooleanEdge(node-&gt;child2());
</span><del>-                node-&gt;clearFlags(NodeMustGenerate | NodeClobbersWorld);
</del><ins>+                node-&gt;clearFlags(NodeMustGenerate);
</ins><span class="cx">                 break;
</span><span class="cx">             }
</span><span class="cx">             if (node-&gt;op() != CompareEq)
</span><span class="lines">@@ -409,31 +409,31 @@
</span><span class="cx">             if (node-&gt;child1()-&gt;shouldSpeculateStringIdent() &amp;&amp; node-&gt;child2()-&gt;shouldSpeculateStringIdent()) {
</span><span class="cx">                 fixEdge&lt;StringIdentUse&gt;(node-&gt;child1());
</span><span class="cx">                 fixEdge&lt;StringIdentUse&gt;(node-&gt;child2());
</span><del>-                node-&gt;clearFlags(NodeMustGenerate | NodeClobbersWorld);
</del><ins>+                node-&gt;clearFlags(NodeMustGenerate);
</ins><span class="cx">                 break;
</span><span class="cx">             }
</span><span class="cx">             if (node-&gt;child1()-&gt;shouldSpeculateString() &amp;&amp; node-&gt;child2()-&gt;shouldSpeculateString() &amp;&amp; GPRInfo::numberOfRegisters &gt;= 7) {
</span><span class="cx">                 fixEdge&lt;StringUse&gt;(node-&gt;child1());
</span><span class="cx">                 fixEdge&lt;StringUse&gt;(node-&gt;child2());
</span><del>-                node-&gt;clearFlags(NodeMustGenerate | NodeClobbersWorld);
</del><ins>+                node-&gt;clearFlags(NodeMustGenerate);
</ins><span class="cx">                 break;
</span><span class="cx">             }
</span><span class="cx">             if (node-&gt;child1()-&gt;shouldSpeculateObject() &amp;&amp; node-&gt;child2()-&gt;shouldSpeculateObject()) {
</span><span class="cx">                 fixEdge&lt;ObjectUse&gt;(node-&gt;child1());
</span><span class="cx">                 fixEdge&lt;ObjectUse&gt;(node-&gt;child2());
</span><del>-                node-&gt;clearFlags(NodeMustGenerate | NodeClobbersWorld);
</del><ins>+                node-&gt;clearFlags(NodeMustGenerate);
</ins><span class="cx">                 break;
</span><span class="cx">             }
</span><span class="cx">             if (node-&gt;child1()-&gt;shouldSpeculateObject() &amp;&amp; node-&gt;child2()-&gt;shouldSpeculateObjectOrOther()) {
</span><span class="cx">                 fixEdge&lt;ObjectUse&gt;(node-&gt;child1());
</span><span class="cx">                 fixEdge&lt;ObjectOrOtherUse&gt;(node-&gt;child2());
</span><del>-                node-&gt;clearFlags(NodeMustGenerate | NodeClobbersWorld);
</del><ins>+                node-&gt;clearFlags(NodeMustGenerate);
</ins><span class="cx">                 break;
</span><span class="cx">             }
</span><span class="cx">             if (node-&gt;child1()-&gt;shouldSpeculateObjectOrOther() &amp;&amp; node-&gt;child2()-&gt;shouldSpeculateObject()) {
</span><span class="cx">                 fixEdge&lt;ObjectOrOtherUse&gt;(node-&gt;child1());
</span><span class="cx">                 fixEdge&lt;ObjectUse&gt;(node-&gt;child2());
</span><del>-                node-&gt;clearFlags(NodeMustGenerate | NodeClobbersWorld);
</del><ins>+                node-&gt;clearFlags(NodeMustGenerate);
</ins><span class="cx">                 break;
</span><span class="cx">             }
</span><span class="cx">             break;
</span><span class="lines">@@ -829,7 +829,7 @@
</span><span class="cx">         case NewTypedArray: {
</span><span class="cx">             if (node-&gt;child1()-&gt;shouldSpeculateInt32()) {
</span><span class="cx">                 fixEdge&lt;Int32Use&gt;(node-&gt;child1());
</span><del>-                node-&gt;clearFlags(NodeMustGenerate | NodeClobbersWorld);
</del><ins>+                node-&gt;clearFlags(NodeMustGenerate);
</ins><span class="cx">                 break;
</span><span class="cx">             }
</span><span class="cx">             break;
</span><span class="lines">@@ -1947,7 +1947,7 @@
</span><span class="cx">         // We can use a BitLShift here because typed arrays will never have a byteLength
</span><span class="cx">         // that overflows int32.
</span><span class="cx">         node-&gt;setOp(BitLShift);
</span><del>-        node-&gt;clearFlags(NodeMustGenerate | NodeClobbersWorld);
</del><ins>+        node-&gt;clearFlags(NodeMustGenerate);
</ins><span class="cx">         observeUseKindOnNode(length, Int32Use);
</span><span class="cx">         observeUseKindOnNode(shiftAmount, Int32Use);
</span><span class="cx">         node-&gt;child1() = Edge(length, Int32Use);
</span><span class="lines">@@ -1958,7 +1958,7 @@
</span><span class="cx">     void convertToGetArrayLength(Node* node, ArrayMode arrayMode)
</span><span class="cx">     {
</span><span class="cx">         node-&gt;setOp(GetArrayLength);
</span><del>-        node-&gt;clearFlags(NodeMustGenerate | NodeClobbersWorld);
</del><ins>+        node-&gt;clearFlags(NodeMustGenerate);
</ins><span class="cx">         fixEdge&lt;KnownCellUse&gt;(node-&gt;child1());
</span><span class="cx">         node-&gt;setArrayMode(arrayMode);
</span><span class="cx">             
</span><span class="lines">@@ -1991,7 +1991,7 @@
</span><span class="cx">             0, neverNeedsStorage);
</span><span class="cx">         
</span><span class="cx">         node-&gt;setOp(GetTypedArrayByteOffset);
</span><del>-        node-&gt;clearFlags(NodeMustGenerate | NodeClobbersWorld);
</del><ins>+        node-&gt;clearFlags(NodeMustGenerate);
</ins><span class="cx">         fixEdge&lt;KnownCellUse&gt;(node-&gt;child1());
</span><span class="cx">         return true;
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGGraphh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGGraph.h (179839 => 179840)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGGraph.h        2015-02-09 19:53:28 UTC (rev 179839)
+++ trunk/Source/JavaScriptCore/dfg/DFGGraph.h        2015-02-09 19:57:41 UTC (rev 179840)
</span><span class="lines">@@ -545,72 +545,6 @@
</span><span class="cx">     
</span><span class="cx">     void killUnreachableBlocks();
</span><span class="cx">     
</span><del>-    bool isPredictedNumerical(Node* node)
-    {
-        return isNumerical(node-&gt;child1().useKind()) &amp;&amp; isNumerical(node-&gt;child2().useKind());
-    }
-    
-    // Note that a 'true' return does not actually mean that the ByVal access clobbers nothing.
-    // It really means that it will not clobber the entire world. It's still up to you to
-    // carefully consider things like:
-    // - PutByVal definitely changes the array it stores to, and may even change its length.
-    // - PutByOffset definitely changes the object it stores to.
-    // - and so on.
-    bool byValIsPure(Node* node)
-    {
-        switch (node-&gt;arrayMode().type()) {
-        case Array::Generic:
-            return false;
-        case Array::Int32:
-        case Array::Double:
-        case Array::Contiguous:
-        case Array::ArrayStorage:
-            return !node-&gt;arrayMode().isOutOfBounds();
-        case Array::SlowPutArrayStorage:
-            return !node-&gt;arrayMode().mayStoreToHole();
-        case Array::String:
-            return node-&gt;op() == GetByVal &amp;&amp; node-&gt;arrayMode().isInBounds();
-#if USE(JSVALUE32_64)
-        case Array::Arguments:
-            if (node-&gt;op() == GetByVal)
-                return true;
-            return false;
-#endif // USE(JSVALUE32_64)
-        default:
-            return true;
-        }
-    }
-    
-    bool clobbersWorld(Node* node)
-    {
-        if (node-&gt;flags() &amp; NodeClobbersWorld)
-            return true;
-        if (!(node-&gt;flags() &amp; NodeMightClobber))
-            return false;
-        switch (node-&gt;op()) {
-        case GetByVal:
-        case PutByValDirect:
-        case PutByVal:
-        case PutByValAlias:
-            return !byValIsPure(node);
-        case ToString:
-            switch (node-&gt;child1().useKind()) {
-            case StringObjectUse:
-            case StringOrStringObjectUse:
-                return false;
-            case CellUse:
-            case UntypedUse:
-                return true;
-            default:
-                RELEASE_ASSERT_NOT_REACHED();
-                return true;
-            }
-        default:
-            RELEASE_ASSERT_NOT_REACHED();
-            return true; // If by some oddity we hit this case in release build it's safer to have CSE assume the worst.
-        }
-    }
-    
</del><span class="cx">     void determineReachability();
</span><span class="cx">     void resetReachability();
</span><span class="cx">     
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGNodeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGNode.h (179839 => 179840)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGNode.h        2015-02-09 19:53:28 UTC (rev 179839)
+++ trunk/Source/JavaScriptCore/dfg/DFGNode.h        2015-02-09 19:57:41 UTC (rev 179840)
</span><span class="lines">@@ -448,7 +448,7 @@
</span><span class="cx">             m_op = Int52Constant;
</span><span class="cx">         else
</span><span class="cx">             m_op = JSConstant;
</span><del>-        m_flags &amp;= ~(NodeMustGenerate | NodeMightClobber | NodeClobbersWorld);
</del><ins>+        m_flags &amp;= ~NodeMustGenerate;
</ins><span class="cx">         m_opInfo = bitwise_cast&lt;uintptr_t&gt;(value);
</span><span class="cx">         children.reset();
</span><span class="cx">     }
</span><span class="lines">@@ -464,7 +464,7 @@
</span><span class="cx">     void convertToGetLocalUnlinked(VirtualRegister local)
</span><span class="cx">     {
</span><span class="cx">         m_op = GetLocalUnlinked;
</span><del>-        m_flags &amp;= ~(NodeMustGenerate | NodeMightClobber | NodeClobbersWorld);
</del><ins>+        m_flags &amp;= ~NodeMustGenerate;
</ins><span class="cx">         m_opInfo = local.offset();
</span><span class="cx">         m_opInfo2 = VirtualRegister().offset();
</span><span class="cx">         children.reset();
</span><span class="lines">@@ -478,7 +478,7 @@
</span><span class="cx">         children.child2().setUseKind(KnownCellUse);
</span><span class="cx">         children.setChild1(storage);
</span><span class="cx">         m_op = GetByOffset;
</span><del>-        m_flags &amp;= ~(NodeClobbersWorld | NodeMustGenerate);
</del><ins>+        m_flags &amp;= ~NodeMustGenerate;
</ins><span class="cx">     }
</span><span class="cx">     
</span><span class="cx">     void convertToMultiGetByOffset(MultiGetByOffsetData* data)
</span><span class="lines">@@ -487,7 +487,6 @@
</span><span class="cx">         m_opInfo = bitwise_cast&lt;intptr_t&gt;(data);
</span><span class="cx">         child1().setUseKind(CellUse);
</span><span class="cx">         m_op = MultiGetByOffset;
</span><del>-        m_flags &amp;= ~NodeClobbersWorld;
</del><span class="cx">         ASSERT(m_flags &amp; NodeMustGenerate);
</span><span class="cx">     }
</span><span class="cx">     
</span><span class="lines">@@ -499,7 +498,6 @@
</span><span class="cx">         children.setChild2(children.child1());
</span><span class="cx">         children.setChild1(storage);
</span><span class="cx">         m_op = PutByOffset;
</span><del>-        m_flags &amp;= ~NodeClobbersWorld;
</del><span class="cx">     }
</span><span class="cx">     
</span><span class="cx">     void convertToMultiPutByOffset(MultiPutByOffsetData* data)
</span><span class="lines">@@ -507,7 +505,6 @@
</span><span class="cx">         ASSERT(m_op == PutById || m_op == PutByIdDirect || m_op == PutByIdFlush);
</span><span class="cx">         m_opInfo = bitwise_cast&lt;intptr_t&gt;(data);
</span><span class="cx">         m_op = MultiPutByOffset;
</span><del>-        m_flags &amp;= ~NodeClobbersWorld;
</del><span class="cx">     }
</span><span class="cx">     
</span><span class="cx">     void convertToPutByOffsetHint()
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGNodeFlagscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGNodeFlags.cpp (179839 => 179840)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGNodeFlags.cpp        2015-02-09 19:53:28 UTC (rev 179839)
+++ trunk/Source/JavaScriptCore/dfg/DFGNodeFlags.cpp        2015-02-09 19:57:41 UTC (rev 179840)
</span><span class="lines">@@ -74,12 +74,6 @@
</span><span class="cx">     if (flags &amp; NodeHasVarArgs)
</span><span class="cx">         out.print(comma, &quot;VarArgs&quot;);
</span><span class="cx">     
</span><del>-    if (flags &amp; NodeClobbersWorld)
-        out.print(comma, &quot;Clobbers&quot;);
-    
-    if (flags &amp; NodeMightClobber)
-        out.print(comma, &quot;MightClobber&quot;);
-    
</del><span class="cx">     if (flags &amp; NodeResultMask) {
</span><span class="cx">         if (!(flags &amp; NodeBytecodeUsesAsNumber) &amp;&amp; !(flags &amp; NodeBytecodeNeedsNegZero))
</span><span class="cx">             out.print(comma, &quot;PureInt&quot;);
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGNodeFlagsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGNodeFlags.h (179839 => 179840)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGNodeFlags.h        2015-02-09 19:53:28 UTC (rev 179839)
+++ trunk/Source/JavaScriptCore/dfg/DFGNodeFlags.h        2015-02-09 19:57:41 UTC (rev 179840)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2012, 2013, 2014 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2012-2015 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">@@ -46,8 +46,7 @@
</span><span class="cx">                                 
</span><span class="cx"> #define NodeMustGenerate                 0x0008 // set on nodes that have side effects, and may not trivially be removed by DCE.
</span><span class="cx"> #define NodeHasVarArgs                   0x0010
</span><del>-#define NodeClobbersWorld                0x0020
-#define NodeMightClobber                 0x0040
</del><ins>+// 0x0020 and 0x0040 are free.
</ins><span class="cx">                                 
</span><span class="cx"> #define NodeBehaviorMask                 0x0780
</span><span class="cx"> #define NodeMayOverflowInBaseline        0x0080
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGNodeTypeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGNodeType.h (179839 => 179840)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGNodeType.h        2015-02-09 19:53:28 UTC (rev 179839)
+++ trunk/Source/JavaScriptCore/dfg/DFGNodeType.h        2015-02-09 19:57:41 UTC (rev 179840)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2012, 2013, 2014 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2012-2015 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">@@ -139,22 +139,22 @@
</span><span class="cx">     macro(ArithCos, NodeResultNumber) \
</span><span class="cx">     \
</span><span class="cx">     /* Add of values may either be arithmetic, or result in string concatenation. */\
</span><del>-    macro(ValueAdd, NodeResultJS | NodeMustGenerate | NodeClobbersWorld) \
</del><ins>+    macro(ValueAdd, NodeResultJS | NodeMustGenerate) \
</ins><span class="cx">     \
</span><span class="cx">     /* Property access. */\
</span><span class="cx">     /* PutByValAlias indicates a 'put' aliases a prior write to the same property. */\
</span><span class="cx">     /* Since a put to 'length' may invalidate optimizations here, */\
</span><span class="cx">     /* this must be the directly subsequent property put. Note that PutByVal */\
</span><span class="cx">     /* opcodes use VarArgs beause they may have up to 4 children. */\
</span><del>-    macro(GetByVal, NodeResultJS | NodeMustGenerate | NodeMightClobber) \
-    macro(PutByValDirect, NodeMustGenerate | NodeHasVarArgs | NodeMightClobber) \
-    macro(PutByVal, NodeMustGenerate | NodeHasVarArgs | NodeMightClobber) \
-    macro(PutByValAlias, NodeMustGenerate | NodeHasVarArgs | NodeMightClobber) \
-    macro(GetById, NodeResultJS | NodeMustGenerate | NodeClobbersWorld) \
-    macro(GetByIdFlush, NodeResultJS | NodeMustGenerate | NodeClobbersWorld) \
-    macro(PutById, NodeMustGenerate | NodeClobbersWorld) \
-    macro(PutByIdFlush, NodeMustGenerate | NodeMustGenerate | NodeClobbersWorld) \
-    macro(PutByIdDirect, NodeMustGenerate | NodeClobbersWorld) \
</del><ins>+    macro(GetByVal, NodeResultJS | NodeMustGenerate) \
+    macro(PutByValDirect, NodeMustGenerate | NodeHasVarArgs) \
+    macro(PutByVal, NodeMustGenerate | NodeHasVarArgs) \
+    macro(PutByValAlias, NodeMustGenerate | NodeHasVarArgs) \
+    macro(GetById, NodeResultJS | NodeMustGenerate) \
+    macro(GetByIdFlush, NodeResultJS | NodeMustGenerate) \
+    macro(PutById, NodeMustGenerate) \
+    macro(PutByIdFlush, NodeMustGenerate | NodeMustGenerate) \
+    macro(PutByIdDirect, NodeMustGenerate) \
</ins><span class="cx">     macro(CheckStructure, NodeMustGenerate) \
</span><span class="cx">     macro(GetExecutable, NodeResultJS) \
</span><span class="cx">     macro(PutStructure, NodeMustGenerate) \
</span><span class="lines">@@ -193,8 +193,8 @@
</span><span class="cx">     macro(CheckInBounds, NodeMustGenerate) \
</span><span class="cx">     \
</span><span class="cx">     /* Optimizations for array mutation. */\
</span><del>-    macro(ArrayPush, NodeResultJS | NodeMustGenerate | NodeClobbersWorld) \
-    macro(ArrayPop, NodeResultJS | NodeMustGenerate | NodeClobbersWorld) \
</del><ins>+    macro(ArrayPush, NodeResultJS | NodeMustGenerate) \
+    macro(ArrayPop, NodeResultJS | NodeMustGenerate) \
</ins><span class="cx">     \
</span><span class="cx">     /* Optimizations for regular expression matching. */\
</span><span class="cx">     macro(RegExpExec, NodeResultJS | NodeMustGenerate) \
</span><span class="lines">@@ -206,26 +206,26 @@
</span><span class="cx">     macro(StringFromCharCode, NodeResultJS) \
</span><span class="cx">     \
</span><span class="cx">     /* Nodes for comparison operations. */\
</span><del>-    macro(CompareLess, NodeResultBoolean | NodeMustGenerate | NodeClobbersWorld) \
-    macro(CompareLessEq, NodeResultBoolean | NodeMustGenerate | NodeClobbersWorld) \
-    macro(CompareGreater, NodeResultBoolean | NodeMustGenerate | NodeClobbersWorld) \
-    macro(CompareGreaterEq, NodeResultBoolean | NodeMustGenerate | NodeClobbersWorld) \
-    macro(CompareEq, NodeResultBoolean | NodeMustGenerate | NodeClobbersWorld) \
</del><ins>+    macro(CompareLess, NodeResultBoolean | NodeMustGenerate) \
+    macro(CompareLessEq, NodeResultBoolean | NodeMustGenerate) \
+    macro(CompareGreater, NodeResultBoolean | NodeMustGenerate) \
+    macro(CompareGreaterEq, NodeResultBoolean | NodeMustGenerate) \
+    macro(CompareEq, NodeResultBoolean | NodeMustGenerate) \
</ins><span class="cx">     macro(CompareEqConstant, NodeResultBoolean) \
</span><span class="cx">     macro(CompareStrictEq, NodeResultBoolean) \
</span><span class="cx">     \
</span><span class="cx">     /* Calls. */\
</span><del>-    macro(Call, NodeResultJS | NodeMustGenerate | NodeHasVarArgs | NodeClobbersWorld) \
-    macro(Construct, NodeResultJS | NodeMustGenerate | NodeHasVarArgs | NodeClobbersWorld) \
-    macro(NativeCall, NodeResultJS | NodeMustGenerate | NodeHasVarArgs | NodeClobbersWorld) \
-    macro(NativeConstruct, NodeResultJS | NodeMustGenerate | NodeHasVarArgs | NodeClobbersWorld) \
</del><ins>+    macro(Call, NodeResultJS | NodeMustGenerate | NodeHasVarArgs) \
+    macro(Construct, NodeResultJS | NodeMustGenerate | NodeHasVarArgs) \
+    macro(NativeCall, NodeResultJS | NodeMustGenerate | NodeHasVarArgs) \
+    macro(NativeConstruct, NodeResultJS | NodeMustGenerate | NodeHasVarArgs) \
</ins><span class="cx">     \
</span><span class="cx">     /* Allocations. */\
</span><span class="cx">     macro(NewObject, NodeResultJS) \
</span><span class="cx">     macro(NewArray, NodeResultJS | NodeHasVarArgs) \
</span><span class="cx">     macro(NewArrayWithSize, NodeResultJS | NodeMustGenerate) \
</span><span class="cx">     macro(NewArrayBuffer, NodeResultJS) \
</span><del>-    macro(NewTypedArray, NodeResultJS | NodeClobbersWorld | NodeMustGenerate) \
</del><ins>+    macro(NewTypedArray, NodeResultJS | NodeMustGenerate) \
</ins><span class="cx">     macro(NewRegexp, NodeResultJS) \
</span><span class="cx">     \
</span><span class="cx">     /* Support for allocation sinking. */\
</span><span class="lines">@@ -249,11 +249,11 @@
</span><span class="cx">     macro(IsFunction, NodeResultBoolean) \
</span><span class="cx">     macro(TypeOf, NodeResultJS) \
</span><span class="cx">     macro(LogicalNot, NodeResultBoolean) \
</span><del>-    macro(ToPrimitive, NodeResultJS | NodeMustGenerate | NodeClobbersWorld) \
-    macro(ToString, NodeResultJS | NodeMustGenerate | NodeMightClobber) \
</del><ins>+    macro(ToPrimitive, NodeResultJS | NodeMustGenerate) \
+    macro(ToString, NodeResultJS | NodeMustGenerate) \
</ins><span class="cx">     macro(NewStringObject, NodeResultJS) \
</span><span class="cx">     macro(MakeRope, NodeResultJS) \
</span><del>-    macro(In, NodeResultBoolean | NodeMustGenerate | NodeClobbersWorld) \
</del><ins>+    macro(In, NodeResultBoolean | NodeMustGenerate) \
</ins><span class="cx">     macro(ProfileType, NodeMustGenerate) \
</span><span class="cx">     macro(ProfileControlFlow, NodeMustGenerate) \
</span><span class="cx">     \
</span><span class="lines">@@ -269,8 +269,8 @@
</span><span class="cx">     macro(TearOffArguments, NodeMustGenerate) \
</span><span class="cx">     macro(GetMyArgumentsLength, NodeResultJS | NodeMustGenerate) \
</span><span class="cx">     macro(GetMyArgumentByVal, NodeResultJS | NodeMustGenerate) \
</span><del>-    macro(GetMyArgumentsLengthSafe, NodeResultJS | NodeMustGenerate | NodeClobbersWorld) \
-    macro(GetMyArgumentByValSafe, NodeResultJS | NodeMustGenerate | NodeClobbersWorld) \
</del><ins>+    macro(GetMyArgumentsLengthSafe, NodeResultJS | NodeMustGenerate) \
+    macro(GetMyArgumentByValSafe, NodeResultJS | NodeMustGenerate) \
</ins><span class="cx">     macro(CheckArgumentsNotCreated, NodeMustGenerate) \
</span><span class="cx">     \
</span><span class="cx">     /* Nodes for creating functions. */\
</span></span></pre>
</div>
</div>

</body>
</html>