diff options
Diffstat (limited to 'js/src/frontend/NameOpEmitter.h')
-rw-r--r-- | js/src/frontend/NameOpEmitter.h | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/js/src/frontend/NameOpEmitter.h b/js/src/frontend/NameOpEmitter.h index 57fe5fe544..f620876a37 100644 --- a/js/src/frontend/NameOpEmitter.h +++ b/js/src/frontend/NameOpEmitter.h @@ -136,54 +136,54 @@ class MOZ_STACK_CLASS NameOpEmitter NameOpEmitter(BytecodeEmitter* bce, JSAtom* name, const NameLocation& loc, Kind kind); private: - MOZ_MUST_USE bool isCall() const { + [[nodiscard]] bool isCall() const { return kind_ == Kind::Call; } - MOZ_MUST_USE bool isSimpleAssignment() const { + [[nodiscard]] bool isSimpleAssignment() const { return kind_ == Kind::SimpleAssignment; } - MOZ_MUST_USE bool isCompoundAssignment() const { + [[nodiscard]] bool isCompoundAssignment() const { return kind_ == Kind::CompoundAssignment; } - MOZ_MUST_USE bool isIncDec() const { + [[nodiscard]] bool isIncDec() const { return isPostIncDec() || isPreIncDec(); } - MOZ_MUST_USE bool isPostIncDec() const { + [[nodiscard]] bool isPostIncDec() const { return kind_ == Kind::PostIncrement || kind_ == Kind::PostDecrement; } - MOZ_MUST_USE bool isPreIncDec() const { + [[nodiscard]] bool isPreIncDec() const { return kind_ == Kind::PreIncrement || kind_ == Kind::PreDecrement; } - MOZ_MUST_USE bool isInc() const { + [[nodiscard]] bool isInc() const { return kind_ == Kind::PostIncrement || kind_ == Kind::PreIncrement; } - MOZ_MUST_USE bool isInitialize() const { + [[nodiscard]] bool isInitialize() const { return kind_ == Kind::Initialize; } public: - MOZ_MUST_USE bool emittedBindOp() const { + [[nodiscard]] bool emittedBindOp() const { return emittedBindOp_; } - MOZ_MUST_USE const NameLocation& loc() const { + [[nodiscard]] const NameLocation& loc() const { return loc_; } - MOZ_MUST_USE bool emitGet(); - MOZ_MUST_USE bool prepareForRhs(); - MOZ_MUST_USE bool emitAssignment(); - MOZ_MUST_USE bool emitIncDec(); + [[nodiscard]] bool emitGet(); + [[nodiscard]] bool prepareForRhs(); + [[nodiscard]] bool emitAssignment(); + [[nodiscard]] bool emitIncDec(); }; } /* namespace frontend */ |