<!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>[189692] releases/WebKitGTK/webkit-2.10/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/189692">189692</a></dd>
<dt>Author</dt> <dd>carlosgc@webkit.org</dd>
<dt>Date</dt> <dd>2015-09-14 01:34:21 -0700 (Mon, 14 Sep 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Merge <a href="http://trac.webkit.org/projects/webkit/changeset/188747">r188747</a> - DFG should have a KnownBooleanUse for cases where we are required to know that the child is a boolean and it's not OK to speculate
https://bugs.webkit.org/show_bug.cgi?id=148286

Reviewed by Benjamin Poulain.

This enables us to ensure that the Branch or LogicalNot after an effectful CompareXYZ can
be marked as !mayExit(). I need that for https://bugs.webkit.org/show_bug.cgi?id=145204.

* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
(JSC::DFG::FixupPhase::observeUseKindOnNode):
* dfg/DFGSafeToExecute.h:
(JSC::DFG::SafeToExecuteEdge::operator()):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::speculate):
* dfg/DFGSpeculativeJIT.h:
(JSC::DFG::SpeculateBooleanOperand::SpeculateBooleanOperand):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::fillSpeculateBoolean):
(JSC::DFG::SpeculativeJIT::compileLogicalNot):
(JSC::DFG::SpeculativeJIT::emitBranch):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::fillSpeculateBoolean):
(JSC::DFG::SpeculativeJIT::compileLogicalNot):
(JSC::DFG::SpeculativeJIT::emitBranch):
* dfg/DFGUseKind.cpp:
(WTF::printInternal):
* dfg/DFGUseKind.h:
(JSC::DFG::typeFilterFor):
(JSC::DFG::shouldNotHaveTypeCheck):
* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::DFG::LowerDFGToLLVM::boolify):
(JSC::FTL::DFG::LowerDFGToLLVM::lowBoolean):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#releasesWebKitGTKwebkit210SourceJavaScriptCoreChangeLog">releases/WebKitGTK/webkit-2.10/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#releasesWebKitGTKwebkit210SourceJavaScriptCoredfgDFGFixupPhasecpp">releases/WebKitGTK/webkit-2.10/Source/JavaScriptCore/dfg/DFGFixupPhase.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit210SourceJavaScriptCoredfgDFGSafeToExecuteh">releases/WebKitGTK/webkit-2.10/Source/JavaScriptCore/dfg/DFGSafeToExecute.h</a></li>
<li><a href="#releasesWebKitGTKwebkit210SourceJavaScriptCoredfgDFGSpeculativeJITcpp">releases/WebKitGTK/webkit-2.10/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit210SourceJavaScriptCoredfgDFGSpeculativeJITh">releases/WebKitGTK/webkit-2.10/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.h</a></li>
<li><a href="#releasesWebKitGTKwebkit210SourceJavaScriptCoredfgDFGSpeculativeJIT32_64cpp">releases/WebKitGTK/webkit-2.10/Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit210SourceJavaScriptCoredfgDFGSpeculativeJIT64cpp">releases/WebKitGTK/webkit-2.10/Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit210SourceJavaScriptCoredfgDFGUseKindcpp">releases/WebKitGTK/webkit-2.10/Source/JavaScriptCore/dfg/DFGUseKind.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit210SourceJavaScriptCoredfgDFGUseKindh">releases/WebKitGTK/webkit-2.10/Source/JavaScriptCore/dfg/DFGUseKind.h</a></li>
<li><a href="#releasesWebKitGTKwebkit210SourceJavaScriptCoreftlFTLCapabilitiescpp">releases/WebKitGTK/webkit-2.10/Source/JavaScriptCore/ftl/FTLCapabilities.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit210SourceJavaScriptCoreftlFTLLowerDFGToLLVMcpp">releases/WebKitGTK/webkit-2.10/Source/JavaScriptCore/ftl/FTLLowerDFGToLLVM.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="releasesWebKitGTKwebkit210SourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.10/Source/JavaScriptCore/ChangeLog (189691 => 189692)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.10/Source/JavaScriptCore/ChangeLog        2015-09-14 08:25:56 UTC (rev 189691)
+++ releases/WebKitGTK/webkit-2.10/Source/JavaScriptCore/ChangeLog        2015-09-14 08:34:21 UTC (rev 189692)
</span><span class="lines">@@ -1,5 +1,43 @@
</span><span class="cx"> 2015-08-20  Filip Pizlo  &lt;fpizlo@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        DFG should have a KnownBooleanUse for cases where we are required to know that the child is a boolean and it's not OK to speculate
+        https://bugs.webkit.org/show_bug.cgi?id=148286
+
+        Reviewed by Benjamin Poulain.
+
+        This enables us to ensure that the Branch or LogicalNot after an effectful CompareXYZ can
+        be marked as !mayExit(). I need that for https://bugs.webkit.org/show_bug.cgi?id=145204.
+
+        * dfg/DFGFixupPhase.cpp:
+        (JSC::DFG::FixupPhase::fixupNode):
+        (JSC::DFG::FixupPhase::observeUseKindOnNode):
+        * dfg/DFGSafeToExecute.h:
+        (JSC::DFG::SafeToExecuteEdge::operator()):
+        * dfg/DFGSpeculativeJIT.cpp:
+        (JSC::DFG::SpeculativeJIT::speculate):
+        * dfg/DFGSpeculativeJIT.h:
+        (JSC::DFG::SpeculateBooleanOperand::SpeculateBooleanOperand):
+        * dfg/DFGSpeculativeJIT32_64.cpp:
+        (JSC::DFG::SpeculativeJIT::fillSpeculateBoolean):
+        (JSC::DFG::SpeculativeJIT::compileLogicalNot):
+        (JSC::DFG::SpeculativeJIT::emitBranch):
+        * dfg/DFGSpeculativeJIT64.cpp:
+        (JSC::DFG::SpeculativeJIT::fillSpeculateBoolean):
+        (JSC::DFG::SpeculativeJIT::compileLogicalNot):
+        (JSC::DFG::SpeculativeJIT::emitBranch):
+        * dfg/DFGUseKind.cpp:
+        (WTF::printInternal):
+        * dfg/DFGUseKind.h:
+        (JSC::DFG::typeFilterFor):
+        (JSC::DFG::shouldNotHaveTypeCheck):
+        * ftl/FTLCapabilities.cpp:
+        (JSC::FTL::canCompile):
+        * ftl/FTLLowerDFGToLLVM.cpp:
+        (JSC::FTL::DFG::LowerDFGToLLVM::boolify):
+        (JSC::FTL::DFG::LowerDFGToLLVM::lowBoolean):
+
+2015-08-20  Filip Pizlo  &lt;fpizlo@apple.com&gt;
+
</ins><span class="cx">         Overflow check elimination fails for a simple test case
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=147387
</span><span class="cx"> 
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit210SourceJavaScriptCoredfgDFGFixupPhasecpp"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.10/Source/JavaScriptCore/dfg/DFGFixupPhase.cpp (189691 => 189692)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.10/Source/JavaScriptCore/dfg/DFGFixupPhase.cpp        2015-09-14 08:25:56 UTC (rev 189691)
+++ releases/WebKitGTK/webkit-2.10/Source/JavaScriptCore/dfg/DFGFixupPhase.cpp        2015-09-14 08:34:21 UTC (rev 189692)
</span><span class="lines">@@ -356,9 +356,19 @@
</span><span class="cx">         }
</span><span class="cx">             
</span><span class="cx">         case LogicalNot: {
</span><del>-            if (node-&gt;child1()-&gt;shouldSpeculateBoolean())
-                fixEdge&lt;BooleanUse&gt;(node-&gt;child1());
-            else if (node-&gt;child1()-&gt;shouldSpeculateObjectOrOther())
</del><ins>+            if (node-&gt;child1()-&gt;shouldSpeculateBoolean()) {
+                if (node-&gt;child1()-&gt;result() == NodeResultBoolean) {
+                    // This is necessary in case we have a bytecode instruction implemented by:
+                    //
+                    // a: CompareEq(...)
+                    // b: LogicalNot(@a)
+                    //
+                    // In that case, CompareEq might have a side-effect. Then, we need to make
+                    // sure that we know that Branch does not exit.
+                    fixEdge&lt;KnownBooleanUse&gt;(node-&gt;child1());
+                } else
+                    fixEdge&lt;BooleanUse&gt;(node-&gt;child1());
+            } else if (node-&gt;child1()-&gt;shouldSpeculateObjectOrOther())
</ins><span class="cx">                 fixEdge&lt;ObjectOrOtherUse&gt;(node-&gt;child1());
</span><span class="cx">             else if (node-&gt;child1()-&gt;shouldSpeculateInt32OrBoolean())
</span><span class="cx">                 fixIntOrBooleanEdge(node-&gt;child1());
</span><span class="lines">@@ -796,9 +806,19 @@
</span><span class="cx">         }
</span><span class="cx">             
</span><span class="cx">         case Branch: {
</span><del>-            if (node-&gt;child1()-&gt;shouldSpeculateBoolean())
-                fixEdge&lt;BooleanUse&gt;(node-&gt;child1());
-            else if (node-&gt;child1()-&gt;shouldSpeculateObjectOrOther())
</del><ins>+            if (node-&gt;child1()-&gt;shouldSpeculateBoolean()) {
+                if (node-&gt;child1()-&gt;result() == NodeResultBoolean) {
+                    // This is necessary in case we have a bytecode instruction implemented by:
+                    //
+                    // a: CompareEq(...)
+                    // b: Branch(@a)
+                    //
+                    // In that case, CompareEq might have a side-effect. Then, we need to make
+                    // sure that we know that Branch does not exit.
+                    fixEdge&lt;KnownBooleanUse&gt;(node-&gt;child1());
+                } else
+                    fixEdge&lt;BooleanUse&gt;(node-&gt;child1());
+            } else if (node-&gt;child1()-&gt;shouldSpeculateObjectOrOther())
</ins><span class="cx">                 fixEdge&lt;ObjectOrOtherUse&gt;(node-&gt;child1());
</span><span class="cx">             else if (node-&gt;child1()-&gt;shouldSpeculateInt32OrBoolean())
</span><span class="cx">                 fixIntOrBooleanEdge(node-&gt;child1());
</span><span class="lines">@@ -1743,6 +1763,7 @@
</span><span class="cx">         VariableAccessData* variable = node-&gt;variableAccessData();
</span><span class="cx">         switch (useKind) {
</span><span class="cx">         case Int32Use:
</span><ins>+        case KnownInt32Use:
</ins><span class="cx">             if (alwaysUnboxSimplePrimitives()
</span><span class="cx">                 || isInt32Speculation(variable-&gt;prediction()))
</span><span class="cx">                 m_profitabilityChanged |= variable-&gt;mergeIsProfitableToUnbox(true);
</span><span class="lines">@@ -1755,6 +1776,7 @@
</span><span class="cx">                 m_profitabilityChanged |= variable-&gt;mergeIsProfitableToUnbox(true);
</span><span class="cx">             break;
</span><span class="cx">         case BooleanUse:
</span><ins>+        case KnownBooleanUse:
</ins><span class="cx">             if (alwaysUnboxSimplePrimitives()
</span><span class="cx">                 || isBooleanSpeculation(variable-&gt;prediction()))
</span><span class="cx">                 m_profitabilityChanged |= variable-&gt;mergeIsProfitableToUnbox(true);
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit210SourceJavaScriptCoredfgDFGSafeToExecuteh"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.10/Source/JavaScriptCore/dfg/DFGSafeToExecute.h (189691 => 189692)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.10/Source/JavaScriptCore/dfg/DFGSafeToExecute.h        2015-09-14 08:25:56 UTC (rev 189691)
+++ releases/WebKitGTK/webkit-2.10/Source/JavaScriptCore/dfg/DFGSafeToExecute.h        2015-09-14 08:34:21 UTC (rev 189692)
</span><span class="lines">@@ -74,6 +74,11 @@
</span><span class="cx">             if (m_state.forNode(edge).m_type &amp; ~SpecInt32)
</span><span class="cx">                 m_result = false;
</span><span class="cx">             return;
</span><ins>+
+        case KnownBooleanUse:
+            if (m_state.forNode(edge).m_type &amp; ~SpecBoolean)
+                m_result = false;
+            return;
</ins><span class="cx">             
</span><span class="cx">         case KnownCellUse:
</span><span class="cx">             if (m_state.forNode(edge).m_type &amp; ~SpecCell)
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit210SourceJavaScriptCoredfgDFGSpeculativeJITcpp"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.10/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp (189691 => 189692)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.10/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp        2015-09-14 08:25:56 UTC (rev 189691)
+++ releases/WebKitGTK/webkit-2.10/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp        2015-09-14 08:34:21 UTC (rev 189692)
</span><span class="lines">@@ -5864,6 +5864,9 @@
</span><span class="cx">     case BooleanUse:
</span><span class="cx">         speculateBoolean(edge);
</span><span class="cx">         break;
</span><ins>+    case KnownBooleanUse:
+        ASSERT(!needsTypeCheck(edge, SpecBoolean));
+        break;
</ins><span class="cx">     case CellUse:
</span><span class="cx">         speculateCell(edge);
</span><span class="cx">         break;
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit210SourceJavaScriptCoredfgDFGSpeculativeJITh"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.10/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.h (189691 => 189692)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.10/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.h        2015-09-14 08:25:56 UTC (rev 189691)
+++ releases/WebKitGTK/webkit-2.10/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.h        2015-09-14 08:34:21 UTC (rev 189692)
</span><span class="lines">@@ -3226,7 +3226,7 @@
</span><span class="cx">         , m_gprOrInvalid(InvalidGPRReg)
</span><span class="cx">     {
</span><span class="cx">         ASSERT(m_jit);
</span><del>-        ASSERT_UNUSED(mode, mode == ManualOperandSpeculation || edge.useKind() == BooleanUse);
</del><ins>+        ASSERT_UNUSED(mode, mode == ManualOperandSpeculation || edge.useKind() == BooleanUse || edge.useKind() == KnownBooleanUse);
</ins><span class="cx">         if (jit-&gt;isFilled(node()))
</span><span class="cx">             gpr();
</span><span class="cx">     }
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit210SourceJavaScriptCoredfgDFGSpeculativeJIT32_64cpp"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.10/Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp (189691 => 189692)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.10/Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp        2015-09-14 08:25:56 UTC (rev 189691)
+++ releases/WebKitGTK/webkit-2.10/Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp        2015-09-14 08:34:21 UTC (rev 189692)
</span><span class="lines">@@ -1055,6 +1055,7 @@
</span><span class="cx"> {
</span><span class="cx">     AbstractValue&amp; value = m_state.forNode(edge);
</span><span class="cx">     SpeculatedType type = value.m_type;
</span><ins>+    ASSERT(edge.useKind() != KnownBooleanUse || !(value.m_type &amp; ~SpecBoolean));
</ins><span class="cx"> 
</span><span class="cx">     m_interpreter.filter(value, SpecBoolean);
</span><span class="cx">     if (value.isClear()) {
</span><span class="lines">@@ -1485,7 +1486,8 @@
</span><span class="cx"> void SpeculativeJIT::compileLogicalNot(Node* node)
</span><span class="cx"> {
</span><span class="cx">     switch (node-&gt;child1().useKind()) {
</span><del>-    case BooleanUse: {
</del><ins>+    case BooleanUse:
+    case KnownBooleanUse: {
</ins><span class="cx">         SpeculateBooleanOperand value(this, node-&gt;child1());
</span><span class="cx">         GPRTemporary result(this, Reuse, value);
</span><span class="cx">         m_jit.xor32(TrustedImm32(1), value.gpr(), result.gpr());
</span><span class="lines">@@ -1604,7 +1606,8 @@
</span><span class="cx">     BasicBlock* notTaken = node-&gt;branchData()-&gt;notTaken.block;
</span><span class="cx"> 
</span><span class="cx">     switch (node-&gt;child1().useKind()) {
</span><del>-    case BooleanUse: {
</del><ins>+    case BooleanUse:
+    case KnownBooleanUse: {
</ins><span class="cx">         SpeculateBooleanOperand value(this, node-&gt;child1());
</span><span class="cx">         MacroAssembler::ResultCondition condition = MacroAssembler::NonZero;
</span><span class="cx"> 
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit210SourceJavaScriptCoredfgDFGSpeculativeJIT64cpp"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.10/Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp (189691 => 189692)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.10/Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp        2015-09-14 08:25:56 UTC (rev 189691)
+++ releases/WebKitGTK/webkit-2.10/Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp        2015-09-14 08:34:21 UTC (rev 189692)
</span><span class="lines">@@ -1167,6 +1167,7 @@
</span><span class="cx"> {
</span><span class="cx">     AbstractValue&amp; value = m_state.forNode(edge);
</span><span class="cx">     SpeculatedType type = value.m_type;
</span><ins>+    ASSERT(edge.useKind() != KnownBooleanUse || !(value.m_type &amp; ~SpecBoolean));
</ins><span class="cx"> 
</span><span class="cx">     m_interpreter.filter(value, SpecBoolean);
</span><span class="cx">     if (value.isClear()) {
</span><span class="lines">@@ -1645,7 +1646,8 @@
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx">     
</span><del>-    case BooleanUse: {
</del><ins>+    case BooleanUse:
+    case KnownBooleanUse: {
</ins><span class="cx">         if (!needsTypeCheck(node-&gt;child1(), SpecBoolean)) {
</span><span class="cx">             SpeculateBooleanOperand value(this, node-&gt;child1());
</span><span class="cx">             GPRTemporary result(this, Reuse, value);
</span><span class="lines">@@ -1797,11 +1799,12 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     case UntypedUse:
</span><del>-    case BooleanUse: {
</del><ins>+    case BooleanUse:
+    case KnownBooleanUse: {
</ins><span class="cx">         JSValueOperand value(this, node-&gt;child1(), ManualOperandSpeculation);
</span><span class="cx">         GPRReg valueGPR = value.gpr();
</span><span class="cx">         
</span><del>-        if (node-&gt;child1().useKind() == BooleanUse) {
</del><ins>+        if (node-&gt;child1().useKind() == BooleanUse || node-&gt;child1().useKind() == KnownBooleanUse) {
</ins><span class="cx">             if (!needsTypeCheck(node-&gt;child1(), SpecBoolean)) {
</span><span class="cx">                 MacroAssembler::ResultCondition condition = MacroAssembler::NonZero;
</span><span class="cx">                 
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit210SourceJavaScriptCoredfgDFGUseKindcpp"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.10/Source/JavaScriptCore/dfg/DFGUseKind.cpp (189691 => 189692)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.10/Source/JavaScriptCore/dfg/DFGUseKind.cpp        2015-09-14 08:25:56 UTC (rev 189691)
+++ releases/WebKitGTK/webkit-2.10/Source/JavaScriptCore/dfg/DFGUseKind.cpp        2015-09-14 08:34:21 UTC (rev 189692)
</span><span class="lines">@@ -70,6 +70,9 @@
</span><span class="cx">     case BooleanUse:
</span><span class="cx">         out.print(&quot;Boolean&quot;);
</span><span class="cx">         return;
</span><ins>+    case KnownBooleanUse:
+        out.print(&quot;KnownBoolean&quot;);
+        return;
</ins><span class="cx">     case CellUse:
</span><span class="cx">         out.print(&quot;Cell&quot;);
</span><span class="cx">         return;
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit210SourceJavaScriptCoredfgDFGUseKindh"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.10/Source/JavaScriptCore/dfg/DFGUseKind.h (189691 => 189692)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.10/Source/JavaScriptCore/dfg/DFGUseKind.h        2015-09-14 08:25:56 UTC (rev 189691)
+++ releases/WebKitGTK/webkit-2.10/Source/JavaScriptCore/dfg/DFGUseKind.h        2015-09-14 08:34:21 UTC (rev 189692)
</span><span class="lines">@@ -48,6 +48,7 @@
</span><span class="cx">     NumberUse,
</span><span class="cx">     RealNumberUse,
</span><span class="cx">     BooleanUse,
</span><ins>+    KnownBooleanUse,
</ins><span class="cx">     CellUse,
</span><span class="cx">     KnownCellUse,
</span><span class="cx">     ObjectUse,
</span><span class="lines">@@ -101,6 +102,7 @@
</span><span class="cx">     case DoubleRepMachineIntUse:
</span><span class="cx">         return SpecInt52AsDouble;
</span><span class="cx">     case BooleanUse:
</span><ins>+    case KnownBooleanUse:
</ins><span class="cx">         return SpecBoolean;
</span><span class="cx">     case CellUse:
</span><span class="cx">     case KnownCellUse:
</span><span class="lines">@@ -145,6 +147,7 @@
</span><span class="cx">     case KnownInt32Use:
</span><span class="cx">     case KnownCellUse:
</span><span class="cx">     case KnownStringUse:
</span><ins>+    case KnownBooleanUse:
</ins><span class="cx">     case Int52RepUse:
</span><span class="cx">     case DoubleRepUse:
</span><span class="cx">         return true;
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit210SourceJavaScriptCoreftlFTLCapabilitiescpp"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.10/Source/JavaScriptCore/ftl/FTLCapabilities.cpp (189691 => 189692)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.10/Source/JavaScriptCore/ftl/FTLCapabilities.cpp        2015-09-14 08:25:56 UTC (rev 189691)
+++ releases/WebKitGTK/webkit-2.10/Source/JavaScriptCore/ftl/FTLCapabilities.cpp        2015-09-14 08:34:21 UTC (rev 189692)
</span><span class="lines">@@ -408,6 +408,7 @@
</span><span class="cx">                 case DoubleRepUse:
</span><span class="cx">                 case DoubleRepRealUse:
</span><span class="cx">                 case BooleanUse:
</span><ins>+                case KnownBooleanUse:
</ins><span class="cx">                 case CellUse:
</span><span class="cx">                 case KnownCellUse:
</span><span class="cx">                 case ObjectUse:
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit210SourceJavaScriptCoreftlFTLLowerDFGToLLVMcpp"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.10/Source/JavaScriptCore/ftl/FTLLowerDFGToLLVM.cpp (189691 => 189692)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.10/Source/JavaScriptCore/ftl/FTLLowerDFGToLLVM.cpp        2015-09-14 08:25:56 UTC (rev 189691)
+++ releases/WebKitGTK/webkit-2.10/Source/JavaScriptCore/ftl/FTLLowerDFGToLLVM.cpp        2015-09-14 08:34:21 UTC (rev 189692)
</span><span class="lines">@@ -6076,6 +6076,7 @@
</span><span class="cx">     {
</span><span class="cx">         switch (edge.useKind()) {
</span><span class="cx">         case BooleanUse:
</span><ins>+        case KnownBooleanUse:
</ins><span class="cx">             return lowBoolean(edge);
</span><span class="cx">         case Int32Use:
</span><span class="cx">             return m_out.notZero32(lowInt32(edge));
</span><span class="lines">@@ -7066,7 +7067,7 @@
</span><span class="cx">     
</span><span class="cx">     LValue lowBoolean(Edge edge, OperandSpeculationMode mode = AutomaticOperandSpeculation)
</span><span class="cx">     {
</span><del>-        ASSERT_UNUSED(mode, mode == ManualOperandSpeculation || edge.useKind() == BooleanUse);
</del><ins>+        ASSERT_UNUSED(mode, mode == ManualOperandSpeculation || edge.useKind() == BooleanUse || edge.useKind() == KnownBooleanUse);
</ins><span class="cx">         
</span><span class="cx">         if (edge-&gt;hasConstant()) {
</span><span class="cx">             JSValue value = edge-&gt;asJSValue();
</span></span></pre>
</div>
</div>

</body>
</html>