Use predefined names for stack offsets when they exist
Categories
(Core :: JavaScript: WebAssembly, enhancement, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox97 | --- | fixed |
People
(Reporter: lth, Assigned: lth)
Details
Attachments
(1 file)
Not a functional change: We already have predefined names for frame offsets to the TLS slots that take into account shadow stack space. We should use these names uniformly, not randomly expand their definitions in other places.
Assignee | ||
Comment 1•2 years ago
|
||
The names used in some of this code are a little loopy. FrameWithTls is a Frame + two TLS slots, fine. But offset computations methods on FrameWithTls secretly subtract the size of the Frame, so eg ExtractCalleeTlsFromFrameWithTls has to add back sizeof(Frame) to get to the right point because it takes a Frame* argument.
This observation gives rise to a slightly different fix.
Assignee | ||
Comment 2•2 years ago
|
||
Methods that do semi-magical things (subtracting magic values) should
have names to reflect that. Code that compensates for the magic by
undoing it should instead have access to methods that do the right
thing.
Static functions used only by one file might as well be in that file,
and not in some random other file that provides no specific
information for those functions.
Updated•2 years ago
|
Pushed by lhansen@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/cd8f0b107cd4 Clean up FrameWithTls et al. r=rhunt
Comment 4•2 years ago
|
||
bugherder |
Description
•