Closed Bug 1614307 Opened 4 years ago Closed 4 years ago

Replace MOZ_ASSERT with static_assert where appropriate

Categories

(Core :: JavaScript Engine: JIT, task)

task
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla75
Tracking Status
firefox75 --- fixed

People

(Reporter: anba, Assigned: anba)

Details

Attachments

(5 files)

No description provided.

const and constexpr is interchangeable for integral values, but it seems
cleaner to use constexpr throughout the files.

Depends on D62241

Register::FromCode() can't be changed to constexpr due to GCC limitations (bug 1594094).

Depends on D62243

The "None" architecture assembler provides Registers::invalid_reg2 in addition to
Registers::invalid_reg as an alternative invalid register, cf. ReturnReg in
"js/src/jit/none/MacroAssembler-none.h".

Depends on D62244

These assertions can be changed to static_assert without any extra modifications.

Depends on D62245

Pushed by malexandru@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/7abd7df2c324
Part 1: Use constexpr for remaining constants in x86/x64 assemblers. r=tcampbell
https://hg.mozilla.org/integration/autoland/rev/8adbf3e8eeae
Part 2: Use static_assert for Register64 comparison. r=tcampbell
https://hg.mozilla.org/integration/autoland/rev/48193b821c44
Part 3: Use static_assert for Rabaldr scratch registers assertions. r=tcampbell
https://hg.mozilla.org/integration/autoland/rev/dd1ac96c922d
Part 4: Use static_assert for codegen and lowering assertions. r=tcampbell
https://hg.mozilla.org/integration/autoland/rev/4b390fa44646
Part 5: Replace MOZ_ASSERT with static_assert in js/src/jit. r=tcampbell
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: