Closed Bug 1536450 Opened 6 years ago Closed 6 years ago

Make MacroAssembler::getStackPointer non-static

Categories

(Core :: JavaScript Engine: JIT, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla75
Tracking Status
firefox75 --- fixed

People

(Reporter: mgaudet, Assigned: lth)

Details

Attachments

(1 file)

Reviewbot is getting grumpy with [clang-tidy: readability-static-accessed-through-instance] because we use masm.getStackPointer() all over the place.

While this is defined static on a bunch of our platforms, it is non-static on ARM64 I believe, and so we -need- to be using it as an instance method.

We should just make getStackPointer non-static everywhere.

Assignee: nobody → lhansen
Status: NEW → ASSIGNED

Probably worth noting here that getStackPointer() can't be moved into MacroAssembler.h because the return type is not the same on every platform: on ARM64 it's the magic platform-private type RegisterOrSP, on other platforms it's just Register.

getStackPointer is non-static on arm64 so accesses must be via member access: masm.getStackPointer.
But it is static on other platforms, so the member access ticks off the static checkers.
Just make it non-static everywhere; it'll get inlined and boil away in any case.

Pushed by lhansen@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/9f62d77fd228 Make getStackPointer non-static everywhere. r=mgaudet
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla75
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: