summaryrefslogtreecommitdiff
path: root/js/src/gc/Marking.h
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/gc/Marking.h')
-rw-r--r--js/src/gc/Marking.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/js/src/gc/Marking.h b/js/src/gc/Marking.h
index 414079f799..8d5f353a54 100644
--- a/js/src/gc/Marking.h
+++ b/js/src/gc/Marking.h
@@ -86,13 +86,13 @@ class MarkStack
end_ = stack + capacity;
}
- MOZ_MUST_USE bool init(JSGCMode gcMode);
+ [[nodiscard]] bool init(JSGCMode gcMode);
void setBaseCapacity(JSGCMode mode);
size_t maxCapacity() const { return maxCapacity_; }
void setMaxCapacity(size_t maxCapacity);
- MOZ_MUST_USE bool push(uintptr_t item) {
+ [[nodiscard]] bool push(uintptr_t item) {
if (tos_ == end_) {
if (!enlarge(1))
return false;
@@ -102,7 +102,7 @@ class MarkStack
return true;
}
- MOZ_MUST_USE bool push(uintptr_t item1, uintptr_t item2, uintptr_t item3) {
+ [[nodiscard]] bool push(uintptr_t item1, uintptr_t item2, uintptr_t item3) {
uintptr_t* nextTos = tos_ + 3;
if (nextTos > end_) {
if (!enlarge(3))
@@ -129,7 +129,7 @@ class MarkStack
void reset();
/* Grow the stack, ensuring there is space for at least count elements. */
- MOZ_MUST_USE bool enlarge(unsigned count);
+ [[nodiscard]] bool enlarge(unsigned count);
void setGCMode(JSGCMode gcMode);
@@ -169,7 +169,7 @@ class GCMarker : public JSTracer
{
public:
explicit GCMarker(JSRuntime* rt);
- MOZ_MUST_USE bool init(JSGCMode gcMode);
+ [[nodiscard]] bool init(JSGCMode gcMode);
void setMaxCapacity(size_t maxCap) { stack.setMaxCapacity(maxCap); }
size_t maxCapacity() const { return stack.maxCapacity(); }
@@ -217,7 +217,7 @@ class GCMarker : public JSTracer
void delayMarkingArena(gc::Arena* arena);
void delayMarkingChildren(const void* thing);
void markDelayedChildren(gc::Arena* arena);
- MOZ_MUST_USE bool markDelayedChildren(SliceBudget& budget);
+ [[nodiscard]] bool markDelayedChildren(SliceBudget& budget);
bool hasDelayedChildren() const {
return !!unmarkedArenaStackTop;
}
@@ -226,7 +226,7 @@ class GCMarker : public JSTracer
return isMarkStackEmpty() && !unmarkedArenaStackTop;
}
- MOZ_MUST_USE bool drainMarkStack(SliceBudget& budget);
+ [[nodiscard]] bool drainMarkStack(SliceBudget& budget);
void setGCMode(JSGCMode mode) { stack.setGCMode(mode); }
@@ -291,7 +291,7 @@ class GCMarker : public JSTracer
// Mark the given GC thing, but do not trace its children. Return true
// if the thing became marked.
template <typename T>
- MOZ_MUST_USE bool mark(T* thing);
+ [[nodiscard]] bool mark(T* thing);
void pushTaggedPtr(StackTag tag, void* ptr) {
checkZone(ptr);
@@ -321,7 +321,7 @@ class GCMarker : public JSTracer
return stack.isEmpty();
}
- MOZ_MUST_USE bool restoreValueArray(JSObject* obj, void** vpp, void** endp);
+ [[nodiscard]] bool restoreValueArray(JSObject* obj, void** vpp, void** endp);
void saveValueRanges();
inline void processMarkStackTop(SliceBudget& budget);