diff options
Diffstat (limited to 'js/src/frontend/ElemOpEmitter.h')
-rw-r--r-- | js/src/frontend/ElemOpEmitter.h | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/js/src/frontend/ElemOpEmitter.h b/js/src/frontend/ElemOpEmitter.h index c7feac4a94..d1f6a93477 100644 --- a/js/src/frontend/ElemOpEmitter.h +++ b/js/src/frontend/ElemOpEmitter.h @@ -218,63 +218,63 @@ class MOZ_STACK_CLASS ElemOpEmitter ElemOpEmitter(BytecodeEmitter* bce, Kind kind, ObjKind objKind); 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 isPropInit() const { + [[nodiscard]] bool isPropInit() const { return kind_ == Kind::PropInit; } - MOZ_MUST_USE bool isDelete() const { + [[nodiscard]] bool isDelete() const { return kind_ == Kind::Delete; } - 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 isSuper() const { + [[nodiscard]] bool isSuper() const { return objKind_ == ObjKind::Super; } public: - MOZ_MUST_USE bool prepareForObj(); - MOZ_MUST_USE bool prepareForKey(); + [[nodiscard]] bool prepareForObj(); + [[nodiscard]] bool prepareForKey(); - MOZ_MUST_USE bool emitGet(); + [[nodiscard]] bool emitGet(); - MOZ_MUST_USE bool prepareForRhs(); - MOZ_MUST_USE bool skipObjAndKeyAndRhs(); + [[nodiscard]] bool prepareForRhs(); + [[nodiscard]] bool skipObjAndKeyAndRhs(); - MOZ_MUST_USE bool emitDelete(); + [[nodiscard]] bool emitDelete(); - MOZ_MUST_USE bool emitAssignment(); + [[nodiscard]] bool emitAssignment(); - MOZ_MUST_USE bool emitIncDec(); + [[nodiscard]] bool emitIncDec(); }; } /* namespace frontend */ |