[webkit-reviews] review canceled: [Bug 189151] [DFG] DFG should handle String#toString : [Attachment 348706] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Sep 6 09:40:12 PDT 2018


Yusuke Suzuki <yusukesuzuki at slowstart.org> has canceled Yusuke Suzuki
<yusukesuzuki at slowstart.org>'s request for review:
Bug 189151: [DFG] DFG should handle String#toString
https://bugs.webkit.org/show_bug.cgi?id=189151

Attachment 348706: Patch

https://bugs.webkit.org/attachment.cgi?id=348706&action=review




--- Comment #8 from Yusuke Suzuki <yusukesuzuki at slowstart.org> ---
Comment on attachment 348706
  --> https://bugs.webkit.org/attachment.cgi?id=348706
Patch

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

>>>> Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp:2697
>>>> +	      addToGraph(Check, Edge(value, StringOrStringObjectUse));
>>> 
>>> I think that usually when we add new things to the DFG we also add the
generic version. Any reason not to do that here?
>>> 
>>> Specifically:
>>> - add a NodeType for this operation
>>> - parser just emits UntypedUse version
>>> - fixup converts to Check StringOrStringObjectUse and ToString if the
predictions say it’s ok
>>> - add support for the UntypedUse version to the back ends. 
>>> 
>>> I think that now that we have high coverage in the optimizing JITs, we
should avoid regressing that by adding static speculations.
>> 
>> This is because `StringOrStringObjectUse` usekind is the widest use kind for
StringPrototypeValueOf.
>> If the other type of value comes, String#valueOf throws an error. So, DFG
exit occurs.
> 
> The DFG knows how to exit for exceptions without jettisoning. So repeatedly
exiting because of a type check is different. That will jettison the
compilation

Interesting. I'll add StringValueOf, lower it to ToString / Identity in fixup,
and add StringValueOf(Untyped) implementation.


More information about the webkit-reviews mailing list