Replace MOZ_ASSERT with static_assert where appropriate
Categories
(Core :: JavaScript Engine: JIT, task)
Tracking
()
Tracking | Status | |
---|---|---|
firefox75 | --- | fixed |
People
(Reporter: anba, Assigned: anba)
Details
Attachments
(5 files)
Assignee | ||
Comment 1•4 years ago
|
||
const
and constexpr
is interchangeable for integral values, but it seems
cleaner to use constexpr
throughout the files.
Depends on D62241
Assignee | ||
Comment 2•4 years ago
|
||
Depends on D62242
Assignee | ||
Comment 3•4 years ago
|
||
Register::FromCode()
can't be changed to constexpr due to GCC limitations (bug 1594094).
Depends on D62243
Assignee | ||
Comment 4•4 years ago
|
||
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
Assignee | ||
Comment 5•4 years ago
|
||
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
Comment 7•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/7abd7df2c324
https://hg.mozilla.org/mozilla-central/rev/8adbf3e8eeae
https://hg.mozilla.org/mozilla-central/rev/48193b821c44
https://hg.mozilla.org/mozilla-central/rev/dd1ac96c922d
https://hg.mozilla.org/mozilla-central/rev/4b390fa44646
Description
•