зеркало из https://github.com/mozilla/gecko-dev.git
No bug - Add comment, change comment format. DONTBUILD
--HG-- extra : rebase_source : 8acff40eed6ff81c2ea3d03e56659c91a788ea72 extra : source : 3ed8f64c76a504e57970468cc6c959d6e3e382c6
This commit is contained in:
Родитель
bbff1a16b2
Коммит
7142375cef
|
@ -261,6 +261,8 @@ struct Cell
|
||||||
// May be overridden by GC thing kinds that have a compartment pointer.
|
// May be overridden by GC thing kinds that have a compartment pointer.
|
||||||
inline JSCompartment* maybeCompartment() const { return nullptr; }
|
inline JSCompartment* maybeCompartment() const { return nullptr; }
|
||||||
|
|
||||||
|
// The StoreBuffer used to record incoming pointers from the tenured heap.
|
||||||
|
// This will return nullptr for a tenured cell.
|
||||||
inline StoreBuffer* storeBuffer() const;
|
inline StoreBuffer* storeBuffer() const;
|
||||||
|
|
||||||
inline JS::TraceKind getTraceKind() const;
|
inline JS::TraceKind getTraceKind() const;
|
||||||
|
@ -769,25 +771,26 @@ FreeSpan::checkRange(uintptr_t first, uintptr_t last, const Arena* arena) const
|
||||||
*/
|
*/
|
||||||
struct ChunkTrailer
|
struct ChunkTrailer
|
||||||
{
|
{
|
||||||
/* Construct a Nursery ChunkTrailer. */
|
// Construct a Nursery ChunkTrailer.
|
||||||
ChunkTrailer(JSRuntime* rt, StoreBuffer* sb)
|
ChunkTrailer(JSRuntime* rt, StoreBuffer* sb)
|
||||||
: location(ChunkLocation::Nursery), storeBuffer(sb), runtime(rt)
|
: location(ChunkLocation::Nursery), storeBuffer(sb), runtime(rt)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
/* Construct a Tenured heap ChunkTrailer. */
|
// Construct a Tenured heap ChunkTrailer.
|
||||||
explicit ChunkTrailer(JSRuntime* rt)
|
explicit ChunkTrailer(JSRuntime* rt)
|
||||||
: location(ChunkLocation::TenuredHeap), storeBuffer(nullptr), runtime(rt)
|
: location(ChunkLocation::TenuredHeap), storeBuffer(nullptr), runtime(rt)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/* The index the chunk in the nursery, or LocationTenuredHeap. */
|
// The index of the chunk in the nursery, or LocationTenuredHeap.
|
||||||
ChunkLocation location;
|
ChunkLocation location;
|
||||||
uint32_t padding;
|
uint32_t padding;
|
||||||
|
|
||||||
/* The store buffer for writes to things in this chunk or nullptr. */
|
// The store buffer for pointers from tenured things to things in this
|
||||||
|
// chunk. Will be non-null only for nursery chunks.
|
||||||
StoreBuffer* storeBuffer;
|
StoreBuffer* storeBuffer;
|
||||||
|
|
||||||
/* This provides quick access to the runtime from absolutely anywhere. */
|
// Provide quick access to the runtime from absolutely anywhere.
|
||||||
JSRuntime* runtime;
|
JSRuntime* runtime;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -333,13 +333,13 @@ struct Statistics
|
||||||
SliceRange sliceRange() const { return slices.all(); }
|
SliceRange sliceRange() const { return slices.all(); }
|
||||||
size_t slicesLength() const { return slices.length(); }
|
size_t slicesLength() const { return slices.length(); }
|
||||||
|
|
||||||
/* Occasionally print header lines for profiling information. */
|
// Occasionally print header lines for profiling information.
|
||||||
void maybePrintProfileHeaders();
|
void maybePrintProfileHeaders();
|
||||||
|
|
||||||
/* Print header line for profile times. */
|
// Print header line for profile times.
|
||||||
void printProfileHeader();
|
void printProfileHeader();
|
||||||
|
|
||||||
/* Print total profile times on shutdown. */
|
// Print total profile times on shutdown.
|
||||||
void printTotalProfileTimes();
|
void printTotalProfileTimes();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -670,7 +670,8 @@ JSObject::writeBarrierPost(void* cellp, JSObject* prev, JSObject* next)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove the prev entry if the new value does not need it.
|
// Remove the prev entry if the new value does not need it. There will only
|
||||||
|
// be a prev entry if the prev value was in the nursery.
|
||||||
if (prev && (buffer = prev->storeBuffer()))
|
if (prev && (buffer = prev->storeBuffer()))
|
||||||
buffer->unputCell(static_cast<js::gc::Cell**>(cellp));
|
buffer->unputCell(static_cast<js::gc::Cell**>(cellp));
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче