Closed
Bug 1485162
Opened 5 years ago
Closed 5 years ago
remove confusing StackDecrementForCall() overloads
Categories
(Core :: JavaScript: WebAssembly, enhancement)
Core
JavaScript: WebAssembly
Tracking
()
RESOLVED
FIXED
mozilla63
Tracking | Status | |
---|---|---|
firefox63 | --- | fixed |
People
(Reporter: luke, Assigned: luke)
Details
Attachments
(2 files, 1 obsolete file)
7.45 KB,
patch
|
bbouvier
:
review+
|
Details | Diff | Splinter Review |
3.52 KB,
patch
|
bbouvier
:
review+
|
Details | Diff | Splinter Review |
There are 3 overloads for StackDecrementForCall(): one shared with all Ion that makes sense, and 2 that do special stuff and superficially look the same as the shared one. I'm always confusing these so I think it's better to have all of WasmStubs.cpp just use the one common one. This requires being a bit explicit about what has been pushed for the alreadyPushed argument, but I think that's actually good.
![]() |
Assignee | |
Comment 1•5 years ago
|
||
Assignee: nobody → luke
Attachment #9002933 -
Flags: review?(bbouvier)
![]() |
Assignee | |
Comment 2•5 years ago
|
||
Attachment #9002934 -
Flags: review?(bbouvier)
Comment 3•5 years ago
|
||
Comment on attachment 9002933 [details] [diff] [review] kill-overloads Review of attachment 9002933 [details] [diff] [review]: ----------------------------------------------------------------- Ha nice, I've been confused by these overloads in the past. ::: js/src/wasm/WasmStubs.cpp @@ +983,5 @@ > AssertExpectedSP(masm); > > GenerateFunctionPrologue(masm, funcTypeId, Nothing(), offsets); > > + unsigned framePushed = StackDecrementForCall(WasmStackAlignment, In every single other case, it was obvious that masm.framePushed() is 0 because of a visible previous call to setFramePushed(0). Here, it's more subtle; there's an assertion at the end of GenerateFunctionPrologue, but this knowledge is hidden within the function's body. Could we re-assert here instead? or comment?
Attachment #9002933 -
Flags: review?(bbouvier) → review+
Comment 4•5 years ago
|
||
Comment on attachment 9002934 [details] [diff] [review] rm-dead-field Review of attachment 9002934 [details] [diff] [review]: ----------------------------------------------------------------- Sweet, thanks.
Attachment #9002934 -
Flags: review?(bbouvier) → review+
![]() |
Assignee | |
Comment 5•5 years ago
|
||
(In reply to Benjamin Bouvier [:bbouvier] from comment #3) > Could we re-assert here instead? or comment? Good point! It is a rather subtle detail so I improved all the calls so that they are either (1) using masm.framePushed(), (2) using sizeof(Frame) with a comment "// pushed by prologue". (Can't assert b/c the constant is usually computed before the Generate*Prologue(), so masm.framePushed() is 0 before and sizeof(Frame)+framePushed after.)
Pushed by lwagner@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/249688402db2 remove dead CodeGeneratorShared field (r=bbouvier) https://hg.mozilla.org/integration/mozilla-inbound/rev/5ff39f587a0d Baldr: remove confusing StackDecrementForCall() overloads (r=bbouvier)
Comment 7•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/249688402db2 https://hg.mozilla.org/mozilla-central/rev/5ff39f587a0d
Status: NEW → RESOLVED
Closed: 5 years ago
status-firefox63:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
Comment hidden (spam) |
Comment hidden (spam) |
Updated•4 years ago
|
Flags: needinfo?(afuerhoff00)
Updated•4 years ago
|
Attachment #9052091 -
Attachment is obsolete: true
Updated•4 years ago
|
Attachment #9052091 -
Flags: checkin+
You need to log in
before you can comment on or make changes to this bug.
Description
•