Closed Bug 2050858 Opened 4 months ago Closed 4 months ago

Tidy-up MoveEmitter a bit

Categories

(Core :: JavaScript Engine: JIT, task)

task

Tracking

()

RESOLVED FIXED
154 Branch
Tracking Status
firefox154 --- fixed

People

(Reporter: anba, Assigned: anba)

Details

Attachments

(6 external files)

Changes:

  • Make setScratchRegister x86 specific, because it's only called from within #ifdef JS_CODEGEN_X86 guarded code.
  • Make destructor and assertDone more consistent across architectures.
  • Make internal methods private.
  • Make getAdjusted{Offset,Address} const.
  • Remove unused spilledFloatReg_ members.
  • Remove unused 'from' parameter from breakCycle.
  • ...

setScratchRegister is only called from within #ifdef JS_CODEGEN_X86 guarded
code, so it isn't necessary to define it for other architectures than x86.

Using out-of-line definitions just for an assertion doesn't seem helpful, so
move the definitions for all architectures into the header files, just like
it's already the case for ARM64.

Use const methods to match other const methods in MoveEmitter.

Remove the unused spilledFloatReg_ and use fields initialisers. Also
update comments to reflect the current code.

For loong64 and mips additionally remove unused fields and the subslot
parameter from cycleSlot, which is always zero. And for mips-only,
rename spilledReg_ to tempReg_, because no spilling takes place.

Pushed by andre.bargull@gmail.com: https://github.com/mozilla-firefox/firefox/commit/57d31da6a5c1 https://hg.mozilla.org/integration/autoland/rev/74a10ac026b9 Part 1: Make setScratchRegister x86 specific. r=spidermonkey-reviewers,jandem https://github.com/mozilla-firefox/firefox/commit/24fcae7bb127 https://hg.mozilla.org/integration/autoland/rev/f4b1be6a3ed8 Part 2: Consistently define destructor and assertDone in header. r=spidermonkey-reviewers,jandem https://github.com/mozilla-firefox/firefox/commit/4b8adfc683ea https://hg.mozilla.org/integration/autoland/rev/ad2f4d0fd307 Part 3: Move internal MoveEmitter methods into private scope. r=spidermonkey-reviewers,jandem https://github.com/mozilla-firefox/firefox/commit/2997e91379f6 https://hg.mozilla.org/integration/autoland/rev/f254215fc5e6 Part 4: Make MoveEmitter::getAdjusted{Offset,Address} const. r=spidermonkey-reviewers,jandem https://github.com/mozilla-firefox/firefox/commit/d37012ab8217 https://hg.mozilla.org/integration/autoland/rev/1a25ae866bf0 Part 5: Remove unused spilledFloatReg_ from MoveEmitter classes. r=spidermonkey-reviewers,jandem https://github.com/mozilla-firefox/firefox/commit/53bf4f3e9ddf https://hg.mozilla.org/integration/autoland/rev/0c7ffe844e53 Part 6: Remove unused 'from' parameter from breakCycle methods. r=spidermonkey-reviewers,jandem
QA Whiteboard: [qa-triage-done-c155/b154]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: