[Webkit-unassigned] [Bug 215275] Support WebAssembly tail calls in LLInt tier
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Jun 30 09:25:27 PDT 2022
https://bugs.webkit.org/show_bug.cgi?id=215275
--- Comment #14 from tom at leaningtech.com ---
I went on and implemented it in the other tiers, hence we should change the bug title.
I think the convention would need to change the locations of the stack return values if we were to follow the reasoning of unconditionally reusing the previous frame when tail-calling:
With the current convention, the callee stack values are written from stackPointer + headerSize towards framePointer (caller's POV). When a frame is reused, the stack size for argument/returns can grow depending on the callee, which means that when at the return location of the original frame, given that the stack pointer is restored, the caller might not found the values at the right offsets, or they may even be lost.
In the first patch, we always align the stack size (max(stackArgs, stackReturns)) in our calculation, and start writing the return values at offset header + stackSize - numberOfReturnValues (still caller's POV). This way, return values are at the same locations, even if the frame is recycled in between.
In the generators, I am not sure how much refactoring is allowed since most of the code for ReturnCall is similar to Call.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20220630/061621e9/attachment.htm>
More information about the webkit-unassigned
mailing list