<html>
<head>
<base href="https://bugs.webkit.org/">
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - Enable IC for put_by_id_with_this"
href="https://bugs.webkit.org/show_bug.cgi?id=162125#c14">Comment # 14</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - Enable IC for put_by_id_with_this"
href="https://bugs.webkit.org/show_bug.cgi?id=162125">bug 162125</a>
from <span class="vcard"><a class="email" href="mailto:sbarati@apple.com" title="Saam Barati <sbarati@apple.com>"> <span class="fn">Saam Barati</span></a>
</span></b>
<pre>Comment on <span class=""><a href="attachment.cgi?id=305938&action=diff" name="attach_305938" title="Proposed Patch">attachment 305938</a> <a href="attachment.cgi?id=305938&action=edit" title="Proposed Patch">[details]</a></span>
Proposed Patch
View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=305938&action=review">https://bugs.webkit.org/attachment.cgi?id=305938&action=review</a>
mostly LGTM, just a couple comments. I also think I found a bug.
<span class="quote">> Source/JavaScriptCore/dfg/DFGFixupPhase.cpp:1912
> +#if USE(JSVALUE64_32)
> + case PutByIdWithThis:
> +#endif</span >
This is wrong. I believe it should be JSVALUE32_64. I think it's simpler if you just leave the 32-bit version in the code above, and have the USE(JSVALUE64) over a smaller range.
<span class="quote">> Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp:4591
> + JITCompiler::JumpList notCellList;
> + notCellList.append(m_jit.branchIfNotCell(JSValueRegs(baseGPR)));
> + notCellList.append(m_jit.branchIfNotCell(JSValueRegs(thisGPR)));</span >
Looks like a bug that you don't use this after appending to it. Please add tests. Should be an Insta crash.
That said, the more I think about it, are there any scenarios where |this|/base won't be a cell?
<span class="quote">> Source/JavaScriptCore/jit/Repatch.cpp:353
> + if (UNLIKELY(putKind == WithThis))</span >
I don't think you need the UNLIKELY here. It might be the case that users do use this a lot.</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>