[Webkit-unassigned] [Bug 160588] Refactor MathIC compilation process in Baseline and DFG to turn temporary registers usage more flexible

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Nov 6 14:49:12 PST 2016


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

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

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

> Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp:3563
> +    GPRReg scratchGPR[Generator::scratchGPRRegCount];
> +    FPRReg scratchFPR[Generator::scratchFPRRegCount];

I'm more of a fan of using Vector<> with an inline capacity for this API. You'll still get the same property where you don't end up mallocing any memory.

> Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp:3600
> +    for (size_t i = 0; i < std::min<unsigned>(availableGPRs, scratchGPRRegCount); i++) {

It seems wrong if the min() expression ever returns availableGPRs instead of scratchGPRRegCount. I would just turn this into an assert that we have enough registers.

> Source/JavaScriptCore/jit/JITMulGenerator.h:45
> +        FPRReg leftFPR, FPRReg rightFPR, GPRReg *scratchGPRs, FPRReg *scratchFPRs)

See my comment about using Vector here instead. You could even templatize it over Vector type to not have to worry about what the inline capacity of it is.

-- 
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/20161106/8f5ac96e/attachment.html>


More information about the webkit-unassigned mailing list