[webkit-reviews] review granted: [Bug 112477] Potentially unsafe register allocations in DFG code generation : [Attachment 193402] Speculative patch for Qt build failure

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Mar 18 11:30:27 PDT 2013


Geoffrey Garen <ggaren at apple.com> has granted Michael Saboff
<msaboff at apple.com>'s request for review:
Bug 112477: Potentially unsafe register allocations in DFG code generation
https://bugs.webkit.org/show_bug.cgi?id=112477

Attachment 193402: Speculative patch for Qt build failure
https://bugs.webkit.org/attachment.cgi?id=193402&action=review

------- Additional Comments from Geoffrey Garen <ggaren at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=193402&action=review


r=me with one change suggested below:

> Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp:1609
> +    GPRTemporary structure;
> +    GPRReg structureGPR = InvalidGPRReg;
> +
> +    if
(!m_jit.graph().globalObjectFor(m_currentNode->codeOrigin)->masqueradesAsUndefi
nedWatchpoint()->isStillValid()) {
> +	   GPRTemporary realStructure(this); // Only allocate on this path,
before the branch
> +	   structure.adopt(realStructure);
> +	   structureGPR = structure.gpr();
> +    }

Let's use this model everywhere -- that way, we're always allocating our
registers at the top of the function, and it's clearer that we got this right.

Let's update this comment so it's clearer why we're doing this. Something like,
"The masquerades as undefined case will use the structure register, so allocate
it here. Do this at the top of the function to avoid branching around a
register allocation."


More information about the webkit-reviews mailing list