<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Undefined Behavior in JSValue cast from NaN"
   href="https://bugs.webkit.org/show_bug.cgi?id=160322#c7">Comment # 7</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Undefined Behavior in JSValue cast from NaN"
   href="https://bugs.webkit.org/show_bug.cgi?id=160322">bug 160322</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>Jonathan, I suspect the compiler would have folded away the int casted check at the top of JSValue(double) when we pass it a constant PNaN.  Hence, your patch is not necessarily a perf improvement after all.  Did you actually see the compiler actually generate code for this check?  If so, let's take this patch.  If not, we can let it go.

Regarding the general case, I see Keith's point.  In order for it to be an issue, a compiler would have to do more work to convert the int back to a double that matches NaN / Inf rather than just letting the CPU do its thing.  Hence, it's probably not an issue in practice and we can ignore it.</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>