diff options
Diffstat (limited to 'js/src/jit/JitCompartment.h')
-rw-r--r-- | js/src/jit/JitCompartment.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/js/src/jit/JitCompartment.h b/js/src/jit/JitCompartment.h index a6cbd86719..4ef5cb4e4a 100644 --- a/js/src/jit/JitCompartment.h +++ b/js/src/jit/JitCompartment.h @@ -215,14 +215,14 @@ class JitRuntime public: explicit JitRuntime(JSRuntime* rt); ~JitRuntime(); - MOZ_MUST_USE bool initialize(JSContext* cx, js::AutoLockForExclusiveAccess& lock); + [[nodiscard]] bool initialize(JSContext* cx, js::AutoLockForExclusiveAccess& lock); uint8_t* allocateOsrTempData(size_t size); void freeOsrTempData(); static void Mark(JSTracer* trc, js::AutoLockForExclusiveAccess& lock); static void MarkJitcodeGlobalTableUnconditionally(JSTracer* trc); - static MOZ_MUST_USE bool MarkJitcodeGlobalTableIteratively(JSTracer* trc); + [[nodiscard]] static bool MarkJitcodeGlobalTableIteratively(JSTracer* trc); static void SweepJitcodeGlobalTable(JSRuntime* rt); ExecutableAllocator& execAlloc() { @@ -473,7 +473,7 @@ class JitCompartment return p->value(); return nullptr; } - MOZ_MUST_USE bool putStubCode(JSContext* cx, uint32_t key, Handle<JitCode*> stubCode) { + [[nodiscard]] bool putStubCode(JSContext* cx, uint32_t key, Handle<JitCode*> stubCode) { MOZ_ASSERT(stubCode); if (!stubCodes_->putNew(key, stubCode.get())) { ReportOutOfMemory(cx); @@ -490,7 +490,7 @@ class JitCompartment *stubInfo = nullptr; return nullptr; } - MOZ_MUST_USE bool putCacheIRStubCode(const CacheIRStubKey::Lookup& lookup, CacheIRStubKey& key, + [[nodiscard]] bool putCacheIRStubCode(const CacheIRStubKey::Lookup& lookup, CacheIRStubKey& key, JitCode* stubCode) { CacheIRStubCodeMap::AddPtr p = cacheIRStubCodes_->lookupForAdd(lookup); @@ -528,10 +528,10 @@ class JitCompartment JitCompartment(); ~JitCompartment(); - MOZ_MUST_USE bool initialize(JSContext* cx); + [[nodiscard]] bool initialize(JSContext* cx); // Initialize code stubs only used by Ion, not Baseline. - MOZ_MUST_USE bool ensureIonStubsExist(JSContext* cx); + [[nodiscard]] bool ensureIonStubsExist(JSContext* cx); void mark(JSTracer* trc, JSCompartment* compartment); void sweep(FreeOp* fop, JSCompartment* compartment); @@ -544,7 +544,7 @@ class JitCompartment return regExpMatcherStub_; } - MOZ_MUST_USE bool ensureRegExpMatcherStubExists(JSContext* cx) { + [[nodiscard]] bool ensureRegExpMatcherStubExists(JSContext* cx) { if (regExpMatcherStub_) return true; regExpMatcherStub_ = generateRegExpMatcherStub(cx); @@ -555,7 +555,7 @@ class JitCompartment return regExpSearcherStub_; } - MOZ_MUST_USE bool ensureRegExpSearcherStubExists(JSContext* cx) { + [[nodiscard]] bool ensureRegExpSearcherStubExists(JSContext* cx) { if (regExpSearcherStub_) return true; regExpSearcherStub_ = generateRegExpSearcherStub(cx); @@ -566,7 +566,7 @@ class JitCompartment return regExpTesterStub_; } - MOZ_MUST_USE bool ensureRegExpTesterStubExists(JSContext* cx) { + [[nodiscard]] bool ensureRegExpTesterStubExists(JSContext* cx) { if (regExpTesterStub_) return true; regExpTesterStub_ = generateRegExpTesterStub(cx); |