No bug - Add comment, change comment format. DONTBUILD

--HG--
extra : rebase_source : 8acff40eed6ff81c2ea3d03e56659c91a788ea72
extra : source : 3ed8f64c76a504e57970468cc6c959d6e3e382c6
This commit is contained in:
Steve Fink 2017-04-24 10:43:07 -07:00
Родитель bbff1a16b2
Коммит 7142375cef
3 изменённых файлов: 13 добавлений и 9 удалений

Просмотреть файл

@ -261,6 +261,8 @@ struct Cell
// May be overridden by GC thing kinds that have a compartment pointer.
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 JS::TraceKind getTraceKind() const;
@ -769,25 +771,26 @@ FreeSpan::checkRange(uintptr_t first, uintptr_t last, const Arena* arena) const
*/
struct ChunkTrailer
{
/* Construct a Nursery ChunkTrailer. */
// Construct a Nursery ChunkTrailer.
ChunkTrailer(JSRuntime* rt, StoreBuffer* sb)
: location(ChunkLocation::Nursery), storeBuffer(sb), runtime(rt)
{}
/* Construct a Tenured heap ChunkTrailer. */
// Construct a Tenured heap ChunkTrailer.
explicit ChunkTrailer(JSRuntime* rt)
: location(ChunkLocation::TenuredHeap), storeBuffer(nullptr), runtime(rt)
{}
public:
/* The index the chunk in the nursery, or LocationTenuredHeap. */
// The index of the chunk in the nursery, or LocationTenuredHeap.
ChunkLocation location;
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;
/* This provides quick access to the runtime from absolutely anywhere. */
// Provide quick access to the runtime from absolutely anywhere.
JSRuntime* runtime;
};

Просмотреть файл

@ -333,13 +333,13 @@ struct Statistics
SliceRange sliceRange() const { return slices.all(); }
size_t slicesLength() const { return slices.length(); }
/* Occasionally print header lines for profiling information. */
// Occasionally print header lines for profiling information.
void maybePrintProfileHeaders();
/* Print header line for profile times. */
// Print header line for profile times.
void printProfileHeader();
/* Print total profile times on shutdown. */
// Print total profile times on shutdown.
void printTotalProfileTimes();
private:

Просмотреть файл

@ -670,7 +670,8 @@ JSObject::writeBarrierPost(void* cellp, JSObject* prev, JSObject* next)
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()))
buffer->unputCell(static_cast<js::gc::Cell**>(cellp));
}