<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body><span class="vcard"><a class="email" href="mailto:mark.lam&#64;apple.com" title="Mark Lam &lt;mark.lam&#64;apple.com&gt;"> <span class="fn">Mark Lam</span></a>
</span> changed
              <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Strict Equality on objects should only check that one of the two sides is an object."
   href="https://bugs.webkit.org/show_bug.cgi?id=145992">bug 145992</a>
        <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">Attachment #255486 Flags</td>
           <td>review?
           </td>
           <td>review+
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Strict Equality on objects should only check that one of the two sides is an object."
   href="https://bugs.webkit.org/show_bug.cgi?id=145992#c31">Comment # 31</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Strict Equality on objects should only check that one of the two sides is an object."
   href="https://bugs.webkit.org/show_bug.cgi?id=145992">bug 145992</a>
              from <span class="vcard"><a class="email" href="mailto:mark.lam&#64;apple.com" title="Mark Lam &lt;mark.lam&#64;apple.com&gt;"> <span class="fn">Mark Lam</span></a>
</span></b>
        <pre>Comment on <span class=""><a href="attachment.cgi?id=255486&amp;action=diff" name="attach_255486" title="Patch">attachment 255486</a> <a href="attachment.cgi?id=255486&amp;action=edit" title="Patch">[details]</a></span>
Patch

View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=255486&amp;action=review">https://bugs.webkit.org/attachment.cgi?id=255486&amp;action=review</a>

r=me with fixes.

<span class="quote">&gt; Source/JavaScriptCore/ChangeLog:9
&gt; +        comparison between the two values (although in the 32-bit case we must also check</span >

missing “that”: … check *that* the other ...

<span class="quote">&gt; Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp:1235
&gt; +    if (taken == nextBlock()) {
&gt; +        branch32(MacroAssembler::NotEqual, op1GPR, op2GPR, notTaken);
&gt; +        jump(taken);
&gt; +    } else {
&gt; +        branch32(MacroAssembler::Equal, op1GPR, op2GPR, taken);
&gt; +        jump(notTaken);
&gt; +    }</span >

This is so much cleaner and easier to read and to reason about.  Is there a reason why you wouldn’t do it this way for the 64-bit version as well?

<span class="quote">&gt; Source/JavaScriptCore/jsc.cpp:888
&gt; +    // Need to cast to int64_t so bitwise_cast will play along.
&gt; +    int64_t asNumber = reinterpret_cast&lt;uint64_t&gt;(value.asCell());</span >

You are right that a reinterpret_cast won’t sign extend.  So, my previous suggestion to use uint64_t is not really necessary (though uint64_t does feel warm and fuzzier than int64_t).  That said, you’re casting to uint64_t here, but the result type is still int64_t.  Ditto for comment.

<span class="quote">&gt; Source/JavaScriptCore/tests/stress/equality-type-checking.js:3
&gt; + * when determining equality via pointer comparision.</span >

typo: comparison.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>