<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body><span class="vcard"><a class="email" href="mailto:mark.lam@apple.com" title="Mark Lam <mark.lam@apple.com>"> <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@apple.com" title="Mark Lam <mark.lam@apple.com>"> <span class="fn">Mark Lam</span></a>
</span></b>
<pre>Comment on <span class=""><a href="attachment.cgi?id=255486&action=diff" name="attach_255486" title="Patch">attachment 255486</a> <a href="attachment.cgi?id=255486&action=edit" title="Patch">[details]</a></span>
Patch
View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=255486&action=review">https://bugs.webkit.org/attachment.cgi?id=255486&action=review</a>
r=me with fixes.
<span class="quote">> Source/JavaScriptCore/ChangeLog:9
> + 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">> Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp:1235
> + if (taken == nextBlock()) {
> + branch32(MacroAssembler::NotEqual, op1GPR, op2GPR, notTaken);
> + jump(taken);
> + } else {
> + branch32(MacroAssembler::Equal, op1GPR, op2GPR, taken);
> + jump(notTaken);
> + }</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">> Source/JavaScriptCore/jsc.cpp:888
> + // Need to cast to int64_t so bitwise_cast will play along.
> + int64_t asNumber = reinterpret_cast<uint64_t>(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">> Source/JavaScriptCore/tests/stress/equality-type-checking.js:3
> + * 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>