<div dir="ltr"><div>Fixed. <a href="https://trac.webkit.org/changeset/204699">https://trac.webkit.org/changeset/204699</a></div><div><br></div><div>So, I think Konstantin will update the QtWebKitNG for the next Technology Preview.</div><div>Once it is done &amp; released, this issue is fixed :)</div><div><br></div><div>On Fri, Aug 19, 2016 at 10:34 PM, Yusuke SUZUKI <span dir="ltr">&lt;<a href="mailto:utatane.tea@gmail.com" target="_blank">utatane.tea@gmail.com</a>&gt;</span> wrote:<br></div><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr">Nice catch!<div><br></div><div>I&#39;ve just filed it in <a href="https://bugs.webkit.org/show_bug.cgi?id=161029" target="_blank">https://bugs.webkit.org/show_b<wbr>ug.cgi?id=161029</a>.</div><div class="gmail_extra">AnyInt includes int52 representation, that is only allowed in 64bit DFG. (See enableInt52())</div><div><div><div class="gmail_extra">
<br><div class="gmail_quote">On Sat, Aug 20, 2016 at 2:49 AM, Konstantin Tokarev <span dir="ltr">&lt;<a href="mailto:annulen@yandex.ru" target="_blank">annulen@yandex.ru</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><br>
<br>
19.08.2016, 20:43, &quot;Konstantin Tokarev&quot; &lt;<a href="mailto:annulen@yandex.ru" target="_blank">annulen@yandex.ru</a>&gt;:<br>
<div><div>&gt; 19.08.2016, 18:34, &quot;Andrew Webster&quot; &lt;<a href="mailto:awebster@arcx.com" target="_blank">awebster@arcx.com</a>&gt;:<br>
&gt;&gt;  This may be a question for webkit-dev, but I thought I&#39;d check here first since I&#39;m using qtwebkit-tp3.<br>
&gt;&gt;<br>
&gt;&gt;  On an arm 32-bit platform in SpeculativeJIT::speculate, I occasionally hit the default handler which contains a release assert when using the WebInspector:<br>
&gt;&gt;<br>
&gt;&gt;  switch (edge.useKind()) {<br>
&gt;&gt;<br>
&gt;&gt;  ...<br>
&gt;&gt;<br>
&gt;&gt;  default:<br>
&gt;&gt;      RELEASE_ASSERT_NOT_REACHED();<br>
&gt;&gt;      break;<br>
&gt;&gt;  }<br>
&gt;&gt;<br>
&gt;&gt;  The value of edge.useKind() causing this is MachineIntUse. The case handler for this value has been ifdef&#39;d out on my platform:<br>
&gt;&gt;<br>
&gt;&gt;  #if USE(JSVALUE64)<br>
&gt;&gt;      case MachineIntUse:<br>
&gt;&gt;          speculateMachineInt(edge);<br>
&gt;&gt;          break;<br>
&gt;&gt;      case DoubleRepMachineIntUse:<br>
&gt;&gt;          speculateDoubleRepMachineInt(e<wbr>dge);<br>
&gt;&gt;          break;<br>
&gt;&gt;  #endif<br>
&gt;&gt;<br>
&gt;&gt;  It appears that MachineIntUse is being set in JSC::DFG::FixupPhase::fixupNod<wbr>e when op is ProfileType:<br>
&gt;&gt;<br>
&gt;&gt;  if (typeSet-&gt;doesTypeConformTo(Ty<wbr>peMachineInt)) {<br>
&gt;&gt;      if (node-&gt;child1()-&gt;shouldSpecula<wbr>teInt32())<br>
&gt;&gt;          fixEdge&lt;Int32Use&gt;(node-&gt;child1<wbr>());<br>
&gt;&gt;      else<br>
&gt;&gt;          fixEdge&lt;MachineIntUse&gt;(node-&gt;c<wbr>hild1());<br>
&gt;&gt;      node-&gt;remove();<br>
&gt;&gt;  }<br>
&gt;&gt;<br>
&gt;&gt;  I am not at all familiar with this code, but from other usage of MachineIntUse, I would guess that this should not be used except on a 64-bit platform. Given that, I am not sure if<br>
&gt;&gt;<br>
&gt;&gt;  1. The typeSet should not conform to TypeMachineInt on 32-bit,<br>
&gt;&gt;<br>
&gt;&gt;  2. shouldSpeculateInt32 should always be true on 32-bit,<br>
&gt;&gt;<br>
&gt;&gt;  3. Int32Use should always be used on 32-bit, or<br>
&gt;&gt;<br>
&gt;&gt;  4. Something else.<br>
&gt;&gt;<br>
&gt;&gt;  I currently am going with 3:<br>
&gt;&gt;<br>
&gt;&gt;  if (typeSet-&gt;doesTypeConformTo(Ty<wbr>peMachineInt)) {<br>
&gt;&gt;  #if USE(JSVALUE64)<br>
&gt;&gt;      if (node-&gt;child1()-&gt;shouldSpecula<wbr>teInt32())<br>
&gt;&gt;  #endif<br>
&gt;&gt;          fixEdge&lt;Int32Use&gt;(node-&gt;child1<wbr>());<br>
&gt;&gt;  #if USE(JSVALUE64)<br>
&gt;&gt;      else<br>
&gt;&gt;          fixEdge&lt;MachineIntUse&gt;(node-&gt;c<wbr>hild1());<br>
&gt;&gt;  #endif<br>
&gt;&gt;<br>
&gt;&gt;  }<br>
&gt;&gt;<br>
&gt;&gt;  This has solved my immediate problem, but due to my lack of understanding, this solution could be quite flawed.<br>
&gt;&gt;<br>
&gt;&gt;  Any help is much appreciated.<br>
&gt;<br>
&gt; Hello, thanks for the interest!<br>
&gt;<br>
&gt; I&#39;m by no means a JSC expert, however from quick analysis it seems to me that the correct code would be<br>
&gt;<br>
&gt; #if USE(JSVALUE64)<br>
&gt;             if (typeSet-&gt;doesTypeConformTo(Ty<wbr>peMachineInt)) {<br>
&gt;                 if (node-&gt;child1()-&gt;shouldSpecula<wbr>teInt32())<br>
&gt;                     fixEdge&lt;In<wbr>t32Use&gt;(node-&gt;child1());<br>
&gt;                 else<br>
&gt;                     fixEdge&lt;Ma<wbr>chineIntUse&gt;(node-&gt;child1());<br>
&gt;                 node-&gt;remove()<wbr>;<br>
&gt;             }<br>
&gt; #else<br>
&gt;             if (typeSet-&gt;doesTypeConformTo(Ty<wbr>peMachineInt) &amp;&amp; node-&gt;child1()-&gt;shouldSpeculat<wbr>eInt32()) {<br>
&gt;                 fixEdge&lt;Int32U<wbr>se&gt;(node-&gt;child1());<br>
&gt;                 node-&gt;remove()<wbr>;<br>
&gt;             }<br>
&gt; #endif<br>
&gt;<br>
&gt; Anyway, I highly recommend you to:<br>
&gt;<br>
&gt; 1. Ask real JSC experts on webkit-dev or jsc-dev<br>
&gt; 2. Run JSC test suite on target (better debug build as well, as it has much more ASSERTs) before and after such changes<br>
<br>
</div></div>Sorry, I forgot to add an explanation: AFAIU, MachineInt is Int32 | Int52 and on 32-bit platforms we don&#39;t speculate about Int52 because it won&#39;t fit in the register anyway, so MachineInt can be only Int32. If we have a MachineInt which is not inferred to be Int32, we cannot do anything fast with it and we follow to the next branch TypeNumber | TypeMachineInt.<br>
<div><div><br>
--<br>
Regards,<br>
Konstantin<br>
______________________________<wbr>_________________<br>
webkit-qt mailing list<br>
<a href="mailto:webkit-qt@lists.webkit.org" target="_blank">webkit-qt@lists.webkit.org</a><br>
<a href="https://lists.webkit.org/mailman/listinfo/webkit-qt" rel="noreferrer" target="_blank">https://lists.webkit.org/mailm<wbr>an/listinfo/webkit-qt</a><br>
</div></div></blockquote></div><br></div></div></div></div>
</blockquote></div><br></div></div>