[webkit-reviews] review granted: [Bug 206368] [JSC] add DFG/FTL support for op_to_property_key : [Attachment 388049] Patch v2

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jan 17 15:10:54 PST 2020


Yusuke Suzuki <ysuzuki at apple.com> has granted Caitlin Potter (:caitp)
<caitp at igalia.com>'s request for review:
Bug 206368: [JSC] add DFG/FTL support for op_to_property_key
https://bugs.webkit.org/show_bug.cgi?id=206368

Attachment 388049: Patch v2

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




--- Comment #8 from Yusuke Suzuki <ysuzuki at apple.com> ---
Comment on attachment 388049
  --> https://bugs.webkit.org/attachment.cgi?id=388049
Patch v2

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

r=me

> Source/JavaScriptCore/dfg/DFGFixupPhase.cpp:1412
> +	       if (node->child1()->shouldSpeculateStringObject()
> +		   &&
m_graph.canOptimizeStringObjectAccess(node->origin.semantic)) {
> +		   addCheckStructureForOriginalStringObjectUse(StringObjectUse,
node->origin, node->child1().node());
> +		   fixEdge<StringObjectUse>(node->child1());
> +		   node->convertToToString();
> +		   return;

Looks nice.

> Source/JavaScriptCore/dfg/DFGFixupPhase.cpp:1414
> +	       break;

You can also add `node->child1()->shouldSpeculateStringOrStringObject()` case
as ToPrimitive is doing.

> Source/JavaScriptCore/dfg/DFGPredictionPropagationPhase.cpp:1449
> +	   if (type & SpecStringObject &&
m_graph.canOptimizeStringObjectAccess(m_currentNode->origin.semantic))
> +	       return mergeSpeculations(type & SpecSymbol, SpecString);

Nice.


More information about the webkit-reviews mailing list