[Webkit-unassigned] [Bug 77797] DFG's child references from one node to another should have room for type information

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Feb 5 17:13:58 PST 2012


https://bugs.webkit.org/show_bug.cgi?id=77797





--- Comment #12 from Filip Pizlo <fpizlo at apple.com>  2012-02-05 17:13:58 PST ---
(In reply to comment #11)
> (From update of attachment 125538 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=125538&action=review
> 
> Other than the comments included (below?) this looks fairly sensible to me.
> 
> > Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp:173
> > -                    nodeIndex = addToGraph(GetLocal, OpInfo(variableAccessData), nodePtr->child1());
> > +                    nodeIndex = addToGraph(GetLocal, OpInfo(variableAccessData), nodePtr->child1().index());
> 
> It seems like it would be nicer to make addToGraph take a Node/NodeUse rather than a NodeIndex, which would remove some of the churn in this diff.

Do you really think that's a good idea?  There are 4 addToGraph() methods, and only 2 places where this patch needs to convert a NodeUse to NodeIndex for a call to addToGraph().  In general, ByteCodeParser almost never needs to create a node that references a child of another node - which is the only case where it would make sense for addToGraph() to take NodeUse.

> 
> > Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp:2273
> > +                phiNode->children.child1() = NodeUse(valueInPredecessor);
> 
> I'd prefer setChild1(..) to returning a mutable reference.

I can change those things, but it is necessary for NodeReferenceBlob to return a mutable reference.  Otherwise we'd have no way of later doing a pass that ascribes types to edges.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list