Closed Bug 1669972 Opened 5 years ago Closed 5 years ago

ARM backend: EmitRemainderOrQuotient argument isSigned is wrongly named.

Categories

(Core :: JavaScript Engine: JIT, defect, P5)

ARM
All
defect

Tracking

()

RESOLVED FIXED
83 Branch
Tracking Status
firefox83 --- fixed

People

(Reporter: nbp, Assigned: nbp)

Details

Attachments

(1 file)

EmitRemainderOrQuotient is being called with isUnsigned from its 2 caller, and the isSigned argument is interpreted as isUnsigned, which makes its uses confusing.

We should simply replace isSigned by isUnsigned inside EmitRemainderOrQuotient without inverting the conditions.

Or, there could be 'enum class Signedness { Signed, Unsigned }'... I'm joking a little - we've been using that kind of structure in the wasm code and I'm not sure that it pays for itself in clarity, since enums with two members eventually always seem to be cast to bool, and then the confusion comes back in.

Attachment #9181022 - Attachment description: Bug 1669972 - ARM EmitRemainderOrQuotient: Rename isSigned to isUnsigned to match the indented meaning. → Bug 1669972 - ARM EmitRemainderOrQuotient: Rename isSigned to isUnsigned to match the intended meaning.
Pushed by npierron@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/00fa7c468cec ARM EmitRemainderOrQuotient: Rename isSigned to isUnsigned to match the intended meaning. r=tcampbell
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → 83 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: