diff options
author | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
---|---|---|
committer | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
commit | 5f8de423f190bbb79a62f804151bc24824fa32d8 (patch) | |
tree | 10027f336435511475e392454359edea8e25895d /js/src/gc/GCTrace.h | |
parent | 49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff) | |
download | UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip |
Add m-esr52 at 52.6.0
Diffstat (limited to 'js/src/gc/GCTrace.h')
-rw-r--r-- | js/src/gc/GCTrace.h | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/js/src/gc/GCTrace.h b/js/src/gc/GCTrace.h new file mode 100644 index 000000000..dc3586dd9 --- /dev/null +++ b/js/src/gc/GCTrace.h @@ -0,0 +1,55 @@ +/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- + * vim: set ts=8 sts=4 et sw=4 tw=99: + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#ifndef gc_GCTrace_h +#define gc_GCTrace_h + +#include "gc/Heap.h" + +namespace js { + +class ObjectGroup; + +namespace gc { + +#ifdef JS_GC_TRACE + +extern MOZ_MUST_USE bool InitTrace(GCRuntime& gc); +extern void FinishTrace(); +extern bool TraceEnabled(); +extern void TraceNurseryAlloc(Cell* thing, size_t size); +extern void TraceTenuredAlloc(Cell* thing, AllocKind kind); +extern void TraceCreateObject(JSObject* object); +extern void TraceMinorGCStart(); +extern void TracePromoteToTenured(Cell* src, Cell* dst); +extern void TraceMinorGCEnd(); +extern void TraceMajorGCStart(); +extern void TraceTenuredFinalize(Cell* thing); +extern void TraceMajorGCEnd(); +extern void TraceTypeNewScript(js::ObjectGroup* group); + +#else + +inline MOZ_MUST_USE bool InitTrace(GCRuntime& gc) { return true; } +inline void FinishTrace() {} +inline bool TraceEnabled() { return false; } +inline void TraceNurseryAlloc(Cell* thing, size_t size) {} +inline void TraceTenuredAlloc(Cell* thing, AllocKind kind) {} +inline void TraceCreateObject(JSObject* object) {} +inline void TraceMinorGCStart() {} +inline void TracePromoteToTenured(Cell* src, Cell* dst) {} +inline void TraceMinorGCEnd() {} +inline void TraceMajorGCStart() {} +inline void TraceTenuredFinalize(Cell* thing) {} +inline void TraceMajorGCEnd() {} +inline void TraceTypeNewScript(js::ObjectGroup* group) {} + +#endif + +} /* namespace gc */ +} /* namespace js */ + +#endif |