summaryrefslogtreecommitdiff
path: root/js/src/jit/BaselineBailouts.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/jit/BaselineBailouts.cpp')
-rw-r--r--js/src/jit/BaselineBailouts.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/js/src/jit/BaselineBailouts.cpp b/js/src/jit/BaselineBailouts.cpp
index 4bcaadee47..7b1bdc8c3f 100644
--- a/js/src/jit/BaselineBailouts.cpp
+++ b/js/src/jit/BaselineBailouts.cpp
@@ -116,7 +116,7 @@ struct BaselineStackBuilder
js_free(buffer_);
}
- MOZ_MUST_USE bool init() {
+ [[nodiscard]] bool init() {
MOZ_ASSERT(!buffer_);
MOZ_ASSERT(bufferUsed_ == 0);
buffer_ = reinterpret_cast<uint8_t*>(js_calloc(bufferTotal_));
@@ -142,7 +142,7 @@ struct BaselineStackBuilder
return true;
}
- MOZ_MUST_USE bool enlarge() {
+ [[nodiscard]] bool enlarge() {
MOZ_ASSERT(buffer_ != nullptr);
if (bufferTotal_ & mozilla::tl::MulOverflowMask<2>::value)
return false;
@@ -182,7 +182,7 @@ struct BaselineStackBuilder
return framePushed_;
}
- MOZ_MUST_USE bool subtract(size_t size, const char* info = nullptr) {
+ [[nodiscard]] bool subtract(size_t size, const char* info = nullptr) {
// enlarge the buffer if need be.
while (size > bufferAvail_) {
if (!enlarge())
@@ -203,7 +203,7 @@ struct BaselineStackBuilder
}
template <typename T>
- MOZ_MUST_USE bool write(const T& t) {
+ [[nodiscard]] bool write(const T& t) {
MOZ_ASSERT(!(uintptr_t(&t) >= uintptr_t(header_->copyStackBottom) &&
uintptr_t(&t) < uintptr_t(header_->copyStackTop)),
"Should not reference memory that can be freed");
@@ -214,7 +214,7 @@ struct BaselineStackBuilder
}
template <typename T>
- MOZ_MUST_USE bool writePtr(T* t, const char* info) {
+ [[nodiscard]] bool writePtr(T* t, const char* info) {
if (!write<T*>(t))
return false;
if (info)
@@ -224,7 +224,7 @@ struct BaselineStackBuilder
return true;
}
- MOZ_MUST_USE bool writeWord(size_t w, const char* info) {
+ [[nodiscard]] bool writeWord(size_t w, const char* info) {
if (!write<size_t>(w))
return false;
if (info) {
@@ -241,7 +241,7 @@ struct BaselineStackBuilder
return true;
}
- MOZ_MUST_USE bool writeValue(const Value& val, const char* info) {
+ [[nodiscard]] bool writeValue(const Value& val, const char* info) {
if (!write<Value>(val))
return false;
if (info) {
@@ -253,7 +253,7 @@ struct BaselineStackBuilder
return true;
}
- MOZ_MUST_USE bool maybeWritePadding(size_t alignment, size_t after, const char* info) {
+ [[nodiscard]] bool maybeWritePadding(size_t alignment, size_t after, const char* info) {
MOZ_ASSERT(framePushed_ % sizeof(Value) == 0);
MOZ_ASSERT(after % sizeof(Value) == 0);
size_t offset = ComputeByteAlignment(after, alignment);