[Webkit-unassigned] [Bug 162125] Enable IC for put_by_id_with_this

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Apr 4 15:58:09 PDT 2017


--- Comment #14 from Saam Barati <sbarati at apple.com> ---
Comment on attachment 305938
  --> https://bugs.webkit.org/attachment.cgi?id=305938
Proposed Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=305938&action=review

mostly LGTM, just a couple comments. I also think I found a bug.

> Source/JavaScriptCore/dfg/DFGFixupPhase.cpp:1912
> +#if USE(JSVALUE64_32)
> +        case PutByIdWithThis:
> +#endif

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.

> Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp:4591
> +        JITCompiler::JumpList notCellList;
> +        notCellList.append(m_jit.branchIfNotCell(JSValueRegs(baseGPR)));
> +        notCellList.append(m_jit.branchIfNotCell(JSValueRegs(thisGPR)));

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?

> Source/JavaScriptCore/jit/Repatch.cpp:353
> +        if (UNLIKELY(putKind == WithThis))

I don't think you need the UNLIKELY here. It might be the case that users do use this a lot.

You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20170404/652f3821/attachment.html>

More information about the webkit-unassigned mailing list