diff options
Diffstat (limited to 'js/src/jit/Recover.h')
-rw-r--r-- | js/src/jit/Recover.h | 104 |
1 files changed, 52 insertions, 52 deletions
diff --git a/js/src/jit/Recover.h b/js/src/jit/Recover.h index ee330d78e5..dc4e9bed50 100644 --- a/js/src/jit/Recover.h +++ b/js/src/jit/Recover.h @@ -143,7 +143,7 @@ class MOZ_NON_PARAM RInstruction // Function used to recover the value computed by this instruction. This // function reads its arguments from the allocations listed on the snapshot // iterator and stores its returned value on the snapshot iterator too. - virtual MOZ_MUST_USE bool recover(JSContext* cx, SnapshotIterator& iter) const = 0; + [[nodiscard]] virtual bool recover(JSContext* cx, SnapshotIterator& iter) const = 0; // Decode an RInstruction on top of the reserved storage space, based on the // tag written by the writeRecoverData function of the corresponding MIR @@ -195,7 +195,7 @@ class RResumePoint final : public RInstruction uint32_t numOperands() const override { return numOperands_; } - MOZ_MUST_USE bool recover(JSContext* cx, SnapshotIterator& iter) const override; + [[nodiscard]] bool recover(JSContext* cx, SnapshotIterator& iter) const override; }; class RBitNot final : public RInstruction @@ -203,7 +203,7 @@ class RBitNot final : public RInstruction public: RINSTRUCTION_HEADER_NUM_OP_(BitNot, 1) - MOZ_MUST_USE bool recover(JSContext* cx, SnapshotIterator& iter) const override; + [[nodiscard]] bool recover(JSContext* cx, SnapshotIterator& iter) const override; }; class RBitAnd final : public RInstruction @@ -211,7 +211,7 @@ class RBitAnd final : public RInstruction public: RINSTRUCTION_HEADER_NUM_OP_(BitAnd, 2) - MOZ_MUST_USE bool recover(JSContext* cx, SnapshotIterator& iter) const override; + [[nodiscard]] bool recover(JSContext* cx, SnapshotIterator& iter) const override; }; class RBitOr final : public RInstruction @@ -219,7 +219,7 @@ class RBitOr final : public RInstruction public: RINSTRUCTION_HEADER_NUM_OP_(BitOr, 2) - MOZ_MUST_USE bool recover(JSContext* cx, SnapshotIterator& iter) const override; + [[nodiscard]] bool recover(JSContext* cx, SnapshotIterator& iter) const override; }; class RBitXor final : public RInstruction @@ -227,7 +227,7 @@ class RBitXor final : public RInstruction public: RINSTRUCTION_HEADER_NUM_OP_(BitXor, 2) - MOZ_MUST_USE bool recover(JSContext* cx, SnapshotIterator& iter) const override; + [[nodiscard]] bool recover(JSContext* cx, SnapshotIterator& iter) const override; }; class RLsh final : public RInstruction @@ -235,7 +235,7 @@ class RLsh final : public RInstruction public: RINSTRUCTION_HEADER_NUM_OP_(Lsh, 2) - MOZ_MUST_USE bool recover(JSContext* cx, SnapshotIterator& iter) const override; + [[nodiscard]] bool recover(JSContext* cx, SnapshotIterator& iter) const override; }; class RRsh final : public RInstruction @@ -243,7 +243,7 @@ class RRsh final : public RInstruction public: RINSTRUCTION_HEADER_NUM_OP_(Rsh, 2) - MOZ_MUST_USE bool recover(JSContext* cx, SnapshotIterator& iter) const override; + [[nodiscard]] bool recover(JSContext* cx, SnapshotIterator& iter) const override; }; class RUrsh final : public RInstruction @@ -251,7 +251,7 @@ class RUrsh final : public RInstruction public: RINSTRUCTION_HEADER_NUM_OP_(Ursh, 2) - MOZ_MUST_USE bool recover(JSContext* cx, SnapshotIterator& iter) const override; + [[nodiscard]] bool recover(JSContext* cx, SnapshotIterator& iter) const override; }; class RSignExtendInt32 final : public RInstruction @@ -262,7 +262,7 @@ class RSignExtendInt32 final : public RInstruction public: RINSTRUCTION_HEADER_NUM_OP_(SignExtendInt32, 1) - MOZ_MUST_USE bool recover(JSContext* cx, SnapshotIterator& iter) const override; + [[nodiscard]] bool recover(JSContext* cx, SnapshotIterator& iter) const override; }; class RAdd final : public RInstruction @@ -273,7 +273,7 @@ class RAdd final : public RInstruction public: RINSTRUCTION_HEADER_NUM_OP_(Add, 2) - MOZ_MUST_USE bool recover(JSContext* cx, SnapshotIterator& iter) const override; + [[nodiscard]] bool recover(JSContext* cx, SnapshotIterator& iter) const override; }; class RSub final : public RInstruction @@ -284,7 +284,7 @@ class RSub final : public RInstruction public: RINSTRUCTION_HEADER_NUM_OP_(Sub, 2) - MOZ_MUST_USE bool recover(JSContext* cx, SnapshotIterator& iter) const override; + [[nodiscard]] bool recover(JSContext* cx, SnapshotIterator& iter) const override; }; class RMul final : public RInstruction @@ -296,7 +296,7 @@ class RMul final : public RInstruction public: RINSTRUCTION_HEADER_NUM_OP_(Mul, 2) - MOZ_MUST_USE bool recover(JSContext* cx, SnapshotIterator& iter) const override; + [[nodiscard]] bool recover(JSContext* cx, SnapshotIterator& iter) const override; }; class RDiv final : public RInstruction @@ -307,7 +307,7 @@ class RDiv final : public RInstruction public: RINSTRUCTION_HEADER_NUM_OP_(Div, 2) - MOZ_MUST_USE bool recover(JSContext* cx, SnapshotIterator& iter) const override; + [[nodiscard]] bool recover(JSContext* cx, SnapshotIterator& iter) const override; }; class RMod final : public RInstruction @@ -315,7 +315,7 @@ class RMod final : public RInstruction public: RINSTRUCTION_HEADER_NUM_OP_(Mod, 2) - MOZ_MUST_USE bool recover(JSContext* cx, SnapshotIterator& iter) const override; + [[nodiscard]] bool recover(JSContext* cx, SnapshotIterator& iter) const override; }; class RNot final : public RInstruction @@ -323,7 +323,7 @@ class RNot final : public RInstruction public: RINSTRUCTION_HEADER_NUM_OP_(Not, 1) - MOZ_MUST_USE bool recover(JSContext* cx, SnapshotIterator& iter) const override; + [[nodiscard]] bool recover(JSContext* cx, SnapshotIterator& iter) const override; }; class RConcat final : public RInstruction @@ -331,7 +331,7 @@ class RConcat final : public RInstruction public: RINSTRUCTION_HEADER_NUM_OP_(Concat, 2) - MOZ_MUST_USE bool recover(JSContext* cx, SnapshotIterator& iter) const override; + [[nodiscard]] bool recover(JSContext* cx, SnapshotIterator& iter) const override; }; class RStringLength final : public RInstruction @@ -339,7 +339,7 @@ class RStringLength final : public RInstruction public: RINSTRUCTION_HEADER_NUM_OP_(StringLength, 1) - MOZ_MUST_USE bool recover(JSContext* cx, SnapshotIterator& iter) const override; + [[nodiscard]] bool recover(JSContext* cx, SnapshotIterator& iter) const override; }; class RArgumentsLength final : public RInstruction @@ -347,7 +347,7 @@ class RArgumentsLength final : public RInstruction public: RINSTRUCTION_HEADER_NUM_OP_(ArgumentsLength, 0) - MOZ_MUST_USE bool recover(JSContext* cx, SnapshotIterator& iter) const override; + [[nodiscard]] bool recover(JSContext* cx, SnapshotIterator& iter) const override; }; @@ -356,7 +356,7 @@ class RFloor final : public RInstruction public: RINSTRUCTION_HEADER_NUM_OP_(Floor, 1) - MOZ_MUST_USE bool recover(JSContext* cx, SnapshotIterator& iter) const override; + [[nodiscard]] bool recover(JSContext* cx, SnapshotIterator& iter) const override; }; class RCeil final : public RInstruction @@ -364,7 +364,7 @@ class RCeil final : public RInstruction public: RINSTRUCTION_HEADER_NUM_OP_(Ceil, 1) - MOZ_MUST_USE bool recover(JSContext* cx, SnapshotIterator& iter) const override; + [[nodiscard]] bool recover(JSContext* cx, SnapshotIterator& iter) const override; }; class RRound final : public RInstruction @@ -372,7 +372,7 @@ class RRound final : public RInstruction public: RINSTRUCTION_HEADER_NUM_OP_(Round, 1) - MOZ_MUST_USE bool recover(JSContext* cx, SnapshotIterator& iter) const override; + [[nodiscard]] bool recover(JSContext* cx, SnapshotIterator& iter) const override; }; class RCharCodeAt final : public RInstruction @@ -380,7 +380,7 @@ class RCharCodeAt final : public RInstruction public: RINSTRUCTION_HEADER_NUM_OP_(CharCodeAt, 2) - MOZ_MUST_USE bool recover(JSContext* cx, SnapshotIterator& iter) const override; + [[nodiscard]] bool recover(JSContext* cx, SnapshotIterator& iter) const override; }; class RFromCharCode final : public RInstruction @@ -388,7 +388,7 @@ class RFromCharCode final : public RInstruction public: RINSTRUCTION_HEADER_NUM_OP_(FromCharCode, 1) - MOZ_MUST_USE bool recover(JSContext* cx, SnapshotIterator& iter) const override; + [[nodiscard]] bool recover(JSContext* cx, SnapshotIterator& iter) const override; }; class RPow final : public RInstruction @@ -396,7 +396,7 @@ class RPow final : public RInstruction public: RINSTRUCTION_HEADER_NUM_OP_(Pow, 2) - MOZ_MUST_USE bool recover(JSContext* cx, SnapshotIterator& iter) const override; + [[nodiscard]] bool recover(JSContext* cx, SnapshotIterator& iter) const override; }; class RPowHalf final : public RInstruction @@ -404,7 +404,7 @@ class RPowHalf final : public RInstruction public: RINSTRUCTION_HEADER_NUM_OP_(PowHalf, 1) - MOZ_MUST_USE bool recover(JSContext* cx, SnapshotIterator& iter) const override; + [[nodiscard]] bool recover(JSContext* cx, SnapshotIterator& iter) const override; }; class RMinMax final : public RInstruction @@ -415,7 +415,7 @@ class RMinMax final : public RInstruction public: RINSTRUCTION_HEADER_NUM_OP_(MinMax, 2) - MOZ_MUST_USE bool recover(JSContext* cx, SnapshotIterator& iter) const override; + [[nodiscard]] bool recover(JSContext* cx, SnapshotIterator& iter) const override; }; class RAbs final : public RInstruction @@ -423,7 +423,7 @@ class RAbs final : public RInstruction public: RINSTRUCTION_HEADER_NUM_OP_(Abs, 1) - MOZ_MUST_USE bool recover(JSContext* cx, SnapshotIterator& iter) const override; + [[nodiscard]] bool recover(JSContext* cx, SnapshotIterator& iter) const override; }; class RSqrt final : public RInstruction @@ -434,7 +434,7 @@ class RSqrt final : public RInstruction public: RINSTRUCTION_HEADER_NUM_OP_(Sqrt, 1) - MOZ_MUST_USE bool recover(JSContext* cx, SnapshotIterator& iter) const override; + [[nodiscard]] bool recover(JSContext* cx, SnapshotIterator& iter) const override; }; class RAtan2 final : public RInstruction @@ -442,7 +442,7 @@ class RAtan2 final : public RInstruction public: RINSTRUCTION_HEADER_NUM_OP_(Atan2, 2) - MOZ_MUST_USE bool recover(JSContext* cx, SnapshotIterator& iter) const override; + [[nodiscard]] bool recover(JSContext* cx, SnapshotIterator& iter) const override; }; class RHypot final : public RInstruction @@ -457,7 +457,7 @@ class RHypot final : public RInstruction return numOperands_; } - MOZ_MUST_USE bool recover(JSContext* cx, SnapshotIterator& iter) const override; + [[nodiscard]] bool recover(JSContext* cx, SnapshotIterator& iter) const override; }; class RMathFunction final : public RInstruction @@ -468,14 +468,14 @@ class RMathFunction final : public RInstruction public: RINSTRUCTION_HEADER_NUM_OP_(MathFunction, 1) - MOZ_MUST_USE bool recover(JSContext* cx, SnapshotIterator& iter) const override; + [[nodiscard]] bool recover(JSContext* cx, SnapshotIterator& iter) const override; }; class RRandom final : public RInstruction { RINSTRUCTION_HEADER_NUM_OP_(Random, 0) public: - MOZ_MUST_USE bool recover(JSContext* cx, SnapshotIterator& iter) const override; + [[nodiscard]] bool recover(JSContext* cx, SnapshotIterator& iter) const override; }; class RStringSplit final : public RInstruction @@ -483,7 +483,7 @@ class RStringSplit final : public RInstruction public: RINSTRUCTION_HEADER_NUM_OP_(StringSplit, 3) - MOZ_MUST_USE bool recover(JSContext* cx, SnapshotIterator& iter) const override; + [[nodiscard]] bool recover(JSContext* cx, SnapshotIterator& iter) const override; }; class RNaNToZero final : public RInstruction @@ -499,7 +499,7 @@ class RRegExpMatcher final : public RInstruction public: RINSTRUCTION_HEADER_NUM_OP_(RegExpMatcher, 3) - MOZ_MUST_USE bool recover(JSContext* cx, SnapshotIterator& iter) const override; + [[nodiscard]] bool recover(JSContext* cx, SnapshotIterator& iter) const override; }; class RRegExpSearcher final : public RInstruction @@ -507,7 +507,7 @@ class RRegExpSearcher final : public RInstruction public: RINSTRUCTION_HEADER_NUM_OP_(RegExpSearcher, 3) - MOZ_MUST_USE bool recover(JSContext* cx, SnapshotIterator& iter) const override; + [[nodiscard]] bool recover(JSContext* cx, SnapshotIterator& iter) const override; }; class RRegExpTester final : public RInstruction @@ -515,7 +515,7 @@ class RRegExpTester final : public RInstruction public: RINSTRUCTION_HEADER_NUM_OP_(RegExpTester, 3) - MOZ_MUST_USE bool recover(JSContext* cx, SnapshotIterator& iter) const override; + [[nodiscard]] bool recover(JSContext* cx, SnapshotIterator& iter) const override; }; class RStringReplace final : public RInstruction @@ -526,7 +526,7 @@ class RStringReplace final : public RInstruction public: RINSTRUCTION_HEADER_NUM_OP_(StringReplace, 3) - MOZ_MUST_USE bool recover(JSContext* cx, SnapshotIterator& iter) const override; + [[nodiscard]] bool recover(JSContext* cx, SnapshotIterator& iter) const override; }; class RTypeOf final : public RInstruction @@ -534,7 +534,7 @@ class RTypeOf final : public RInstruction public: RINSTRUCTION_HEADER_NUM_OP_(TypeOf, 1) - MOZ_MUST_USE bool recover(JSContext* cx, SnapshotIterator& iter) const override; + [[nodiscard]] bool recover(JSContext* cx, SnapshotIterator& iter) const override; }; class RToDouble final : public RInstruction @@ -542,7 +542,7 @@ class RToDouble final : public RInstruction public: RINSTRUCTION_HEADER_NUM_OP_(ToDouble, 1) - MOZ_MUST_USE bool recover(JSContext* cx, SnapshotIterator& iter) const override; + [[nodiscard]] bool recover(JSContext* cx, SnapshotIterator& iter) const override; }; class RToFloat32 final : public RInstruction @@ -550,7 +550,7 @@ class RToFloat32 final : public RInstruction public: RINSTRUCTION_HEADER_NUM_OP_(ToFloat32, 1) - MOZ_MUST_USE bool recover(JSContext* cx, SnapshotIterator& iter) const override; + [[nodiscard]] bool recover(JSContext* cx, SnapshotIterator& iter) const override; }; class RTruncateToInt32 final : public RInstruction @@ -558,7 +558,7 @@ class RTruncateToInt32 final : public RInstruction public: RINSTRUCTION_HEADER_NUM_OP_(TruncateToInt32, 1) - MOZ_MUST_USE bool recover(JSContext* cx, SnapshotIterator& iter) const override; + [[nodiscard]] bool recover(JSContext* cx, SnapshotIterator& iter) const override; }; class RNewObject final : public RInstruction @@ -569,7 +569,7 @@ class RNewObject final : public RInstruction public: RINSTRUCTION_HEADER_NUM_OP_(NewObject, 1) - MOZ_MUST_USE bool recover(JSContext* cx, SnapshotIterator& iter) const override; + [[nodiscard]] bool recover(JSContext* cx, SnapshotIterator& iter) const override; }; class RNewTypedArray final : public RInstruction @@ -577,7 +577,7 @@ class RNewTypedArray final : public RInstruction public: RINSTRUCTION_HEADER_NUM_OP_(NewTypedArray, 1) - MOZ_MUST_USE bool recover(JSContext* cx, SnapshotIterator& iter) const override; + [[nodiscard]] bool recover(JSContext* cx, SnapshotIterator& iter) const override; }; class RNewArray final : public RInstruction @@ -588,7 +588,7 @@ class RNewArray final : public RInstruction public: RINSTRUCTION_HEADER_NUM_OP_(NewArray, 1) - MOZ_MUST_USE bool recover(JSContext* cx, SnapshotIterator& iter) const override; + [[nodiscard]] bool recover(JSContext* cx, SnapshotIterator& iter) const override; }; class RNewDerivedTypedObject final : public RInstruction @@ -596,7 +596,7 @@ class RNewDerivedTypedObject final : public RInstruction public: RINSTRUCTION_HEADER_NUM_OP_(NewDerivedTypedObject, 3) - MOZ_MUST_USE bool recover(JSContext* cx, SnapshotIterator& iter) const override; + [[nodiscard]] bool recover(JSContext* cx, SnapshotIterator& iter) const override; }; class RCreateThisWithTemplate final : public RInstruction @@ -604,7 +604,7 @@ class RCreateThisWithTemplate final : public RInstruction public: RINSTRUCTION_HEADER_NUM_OP_(CreateThisWithTemplate, 1) - MOZ_MUST_USE bool recover(JSContext* cx, SnapshotIterator& iter) const override; + [[nodiscard]] bool recover(JSContext* cx, SnapshotIterator& iter) const override; }; class RLambda final : public RInstruction @@ -612,7 +612,7 @@ class RLambda final : public RInstruction public: RINSTRUCTION_HEADER_NUM_OP_(Lambda, 2) - MOZ_MUST_USE bool recover(JSContext* cx, SnapshotIterator& iter) const override; + [[nodiscard]] bool recover(JSContext* cx, SnapshotIterator& iter) const override; }; class RObjectState final : public RInstruction @@ -631,7 +631,7 @@ class RObjectState final : public RInstruction return numSlots() + 1; } - MOZ_MUST_USE bool recover(JSContext* cx, SnapshotIterator& iter) const override; + [[nodiscard]] bool recover(JSContext* cx, SnapshotIterator& iter) const override; }; class RArrayState final : public RInstruction @@ -651,7 +651,7 @@ class RArrayState final : public RInstruction return numElements() + 2; } - MOZ_MUST_USE bool recover(JSContext* cx, SnapshotIterator& iter) const override; + [[nodiscard]] bool recover(JSContext* cx, SnapshotIterator& iter) const override; }; class RAtomicIsLockFree final : public RInstruction @@ -659,7 +659,7 @@ class RAtomicIsLockFree final : public RInstruction public: RINSTRUCTION_HEADER_NUM_OP_(AtomicIsLockFree, 1) - MOZ_MUST_USE bool recover(JSContext* cx, SnapshotIterator& iter) const override; + [[nodiscard]] bool recover(JSContext* cx, SnapshotIterator& iter) const override; }; class RAssertRecoveredOnBailout final : public RInstruction @@ -667,7 +667,7 @@ class RAssertRecoveredOnBailout final : public RInstruction public: RINSTRUCTION_HEADER_NUM_OP_(AssertRecoveredOnBailout, 1) - MOZ_MUST_USE bool recover(JSContext* cx, SnapshotIterator& iter) const override; + [[nodiscard]] bool recover(JSContext* cx, SnapshotIterator& iter) const override; }; #undef RINSTRUCTION_HEADER_ |