diff options
Diffstat (limited to 'js/src/jit/LIR.h')
-rw-r--r-- | js/src/jit/LIR.h | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/js/src/jit/LIR.h b/js/src/jit/LIR.h index bee3b3ebea..ce911ae958 100644 --- a/js/src/jit/LIR.h +++ b/js/src/jit/LIR.h @@ -965,7 +965,7 @@ class LBlock public: explicit LBlock(MBasicBlock* block); - MOZ_MUST_USE bool init(TempAllocator& alloc); + [[nodiscard]] bool init(TempAllocator& alloc); void add(LInstruction* ins) { ins->setBlock(this); @@ -1156,7 +1156,7 @@ class LVariadicInstruction : public details::LInstructionFixedDefsTempsHelper<De FixedList<LAllocation> operands_; public: - MOZ_MUST_USE bool init(TempAllocator& alloc, size_t length) { + [[nodiscard]] bool init(TempAllocator& alloc, size_t length) { return operands_.init(alloc, length); } size_t numOperands() const final override { @@ -1193,13 +1193,13 @@ class LRecoverInfo : public TempObject RecoverOffset recoverOffset_; explicit LRecoverInfo(TempAllocator& alloc); - MOZ_MUST_USE bool init(MResumePoint* mir); + [[nodiscard]] bool init(MResumePoint* mir); // Fill the instruction vector such as all instructions needed for the // recovery are pushed before the current instruction. - MOZ_MUST_USE bool appendOperands(MNode* ins); - MOZ_MUST_USE bool appendDefinition(MDefinition* def); - MOZ_MUST_USE bool appendResumePoint(MResumePoint* rp); + [[nodiscard]] bool appendOperands(MNode* ins); + [[nodiscard]] bool appendDefinition(MDefinition* def); + [[nodiscard]] bool appendResumePoint(MResumePoint* rp); public: static LRecoverInfo* New(MIRGenerator* gen, MResumePoint* mir); @@ -1291,7 +1291,7 @@ class LSnapshot : public TempObject BailoutKind bailoutKind_; LSnapshot(LRecoverInfo* recover, BailoutKind kind); - MOZ_MUST_USE bool init(MIRGenerator* gen); + [[nodiscard]] bool init(MIRGenerator* gen); public: static LSnapshot* New(MIRGenerator* gen, LRecoverInfo* recover, BailoutKind kind); @@ -1480,7 +1480,7 @@ class LSafepoint : public TempObject LiveGeneralRegisterSet gcRegs() const { return gcRegs_; } - MOZ_MUST_USE bool addGcSlot(bool stack, uint32_t slot) { + [[nodiscard]] bool addGcSlot(bool stack, uint32_t slot) { bool result = gcSlots_.append(SlotEntry(stack, slot)); if (result) assertInvariants(); @@ -1500,13 +1500,13 @@ class LSafepoint : public TempObject slotsOrElementsRegs_.addUnchecked(reg); assertInvariants(); } - MOZ_MUST_USE bool addSlotsOrElementsSlot(bool stack, uint32_t slot) { + [[nodiscard]] bool addSlotsOrElementsSlot(bool stack, uint32_t slot) { bool result = slotsOrElementsSlots_.append(SlotEntry(stack, slot)); if (result) assertInvariants(); return result; } - MOZ_MUST_USE bool addSlotsOrElementsPointer(LAllocation alloc) { + [[nodiscard]] bool addSlotsOrElementsPointer(LAllocation alloc) { if (alloc.isMemory()) return addSlotsOrElementsSlot(alloc.isStackSlot(), alloc.memorySlot()); MOZ_ASSERT(alloc.isRegister()); @@ -1525,7 +1525,7 @@ class LSafepoint : public TempObject return false; } - MOZ_MUST_USE bool addGcPointer(LAllocation alloc) { + [[nodiscard]] bool addGcPointer(LAllocation alloc) { if (alloc.isMemory()) return addGcSlot(alloc.isStackSlot(), alloc.memorySlot()); if (alloc.isRegister()) @@ -1545,7 +1545,7 @@ class LSafepoint : public TempObject return false; } - MOZ_MUST_USE bool addValueSlot(bool stack, uint32_t slot) { + [[nodiscard]] bool addValueSlot(bool stack, uint32_t slot) { bool result = valueSlots_.append(SlotEntry(stack, slot)); if (result) assertInvariants(); @@ -1565,14 +1565,14 @@ class LSafepoint : public TempObject #ifdef JS_NUNBOX32 - MOZ_MUST_USE bool addNunboxParts(uint32_t typeVreg, LAllocation type, LAllocation payload) { + [[nodiscard]] bool addNunboxParts(uint32_t typeVreg, LAllocation type, LAllocation payload) { bool result = nunboxParts_.append(NunboxEntry(typeVreg, type, payload)); if (result) assertInvariants(); return result; } - MOZ_MUST_USE bool addNunboxType(uint32_t typeVreg, LAllocation type) { + [[nodiscard]] bool addNunboxType(uint32_t typeVreg, LAllocation type) { for (size_t i = 0; i < nunboxParts_.length(); i++) { if (nunboxParts_[i].type == type) return true; @@ -1590,7 +1590,7 @@ class LSafepoint : public TempObject return result; } - MOZ_MUST_USE bool addNunboxPayload(uint32_t payloadVreg, LAllocation payload) { + [[nodiscard]] bool addNunboxPayload(uint32_t payloadVreg, LAllocation payload) { for (size_t i = 0; i < nunboxParts_.length(); i++) { if (nunboxParts_[i].payload == payload) return true; @@ -1646,7 +1646,7 @@ class LSafepoint : public TempObject return valueRegs_; } - MOZ_MUST_USE bool addBoxedValue(LAllocation alloc) { + [[nodiscard]] bool addBoxedValue(LAllocation alloc) { if (alloc.isRegister()) { Register reg = alloc.toRegister().gpr(); if (!valueRegs().has(reg)) @@ -1788,7 +1788,7 @@ class LIRGraph public: explicit LIRGraph(MIRGraph* mir); - MOZ_MUST_USE bool init() { + [[nodiscard]] bool init() { return constantPoolMap_.init() && blocks_.init(mir_.alloc(), mir_.numBlocks()); } MIRGraph& mir() const { @@ -1803,7 +1803,7 @@ class LIRGraph uint32_t numBlockIds() const { return mir_.numBlockIds(); } - MOZ_MUST_USE bool initBlock(MBasicBlock* mir) { + [[nodiscard]] bool initBlock(MBasicBlock* mir) { auto* block = &blocks_[mir->id()]; auto* lir = new (block) LBlock(mir); return lir->init(mir_.alloc()); @@ -1855,7 +1855,7 @@ class LIRGraph uint32_t totalSlotCount() const { return paddedLocalSlotCount() + argumentsSize(); } - MOZ_MUST_USE bool addConstantToPool(const Value& v, uint32_t* index); + [[nodiscard]] bool addConstantToPool(const Value& v, uint32_t* index); size_t numConstants() const { return constantPool_.length(); } |