diff options
author | Ben Noordhuis <info@bnoordhuis.nl> | 2015-06-19 13:23:56 +0200 |
---|---|---|
committer | Rod Vagg <rod@vagg.org> | 2015-08-04 11:56:14 -0700 |
commit | 70d1f32f5605465a1a630a64f6f0d35f96c7709d (patch) | |
tree | 0a349040a686eafcb0a09943ebc733477dce2781 /deps/v8/src/heap/mark-compact-inl.h | |
parent | 4643b8b6671607a7aff60cbbd0b384dcf2f6959e (diff) | |
download | node-new-70d1f32f5605465a1a630a64f6f0d35f96c7709d.tar.gz |
deps: update v8 to 4.4.63.9
Upgrade the bundled V8 and update code in src/ and lib/ to the new API.
Notable backwards incompatible changes are the removal of the smalloc
module and dropped support for CESU-8 decoding. CESU-8 support can be
brought back if necessary by doing UTF-8 decoding ourselves.
This commit includes https://codereview.chromium.org/1192973004 to fix
a build error on python 2.6 systems. The original commit log follows:
Use optparse in js2c.py for python compatibility
Without this change, V8 won't build on RHEL/CentOS 6 because the
distro python is too old to know about the argparse module.
PR-URL: https://github.com/nodejs/io.js/pull/2022
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Diffstat (limited to 'deps/v8/src/heap/mark-compact-inl.h')
-rw-r--r-- | deps/v8/src/heap/mark-compact-inl.h | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/deps/v8/src/heap/mark-compact-inl.h b/deps/v8/src/heap/mark-compact-inl.h index 66b0a59cec..1ac9a5973a 100644 --- a/deps/v8/src/heap/mark-compact-inl.h +++ b/deps/v8/src/heap/mark-compact-inl.h @@ -15,8 +15,7 @@ namespace internal { MarkBit Marking::MarkBitFrom(Address addr) { MemoryChunk* p = MemoryChunk::FromAddress(addr); - return p->markbits()->MarkBitFromIndex(p->AddressToMarkbitIndex(addr), - p->ContainsOnlyData()); + return p->markbits()->MarkBitFromIndex(p->AddressToMarkbitIndex(addr)); } @@ -24,15 +23,17 @@ void MarkCompactCollector::SetFlags(int flags) { reduce_memory_footprint_ = ((flags & Heap::kReduceMemoryFootprintMask) != 0); abort_incremental_marking_ = ((flags & Heap::kAbortIncrementalMarkingMask) != 0); + finalize_incremental_marking_ = + ((flags & Heap::kFinalizeIncrementalMarkingMask) != 0); + DCHECK(!finalize_incremental_marking_ || !abort_incremental_marking_); } void MarkCompactCollector::MarkObject(HeapObject* obj, MarkBit mark_bit) { DCHECK(Marking::MarkBitFrom(obj) == mark_bit); - if (!mark_bit.Get()) { - mark_bit.Set(); + if (Marking::IsWhite(mark_bit)) { + Marking::WhiteToBlack(mark_bit); MemoryChunk::IncrementLiveBytesFromGC(obj->address(), obj->Size()); - DCHECK(IsMarked(obj)); DCHECK(obj->GetIsolate()->heap()->Contains(obj)); marking_deque_.PushBlack(obj); } @@ -40,9 +41,9 @@ void MarkCompactCollector::MarkObject(HeapObject* obj, MarkBit mark_bit) { void MarkCompactCollector::SetMark(HeapObject* obj, MarkBit mark_bit) { - DCHECK(!mark_bit.Get()); + DCHECK(Marking::IsWhite(mark_bit)); DCHECK(Marking::MarkBitFrom(obj) == mark_bit); - mark_bit.Set(); + Marking::WhiteToBlack(mark_bit); MemoryChunk::IncrementLiveBytesFromGC(obj->address(), obj->Size()); } @@ -50,7 +51,7 @@ void MarkCompactCollector::SetMark(HeapObject* obj, MarkBit mark_bit) { bool MarkCompactCollector::IsMarked(Object* obj) { DCHECK(obj->IsHeapObject()); HeapObject* heap_object = HeapObject::cast(obj); - return Marking::MarkBitFrom(heap_object).Get(); + return Marking::IsBlackOrGrey(Marking::MarkBitFrom(heap_object)); } @@ -62,7 +63,7 @@ void MarkCompactCollector::RecordSlot(Object** anchor_slot, Object** slot, !ShouldSkipEvacuationSlotRecording(anchor_slot)) { if (!SlotsBuffer::AddTo(&slots_buffer_allocator_, object_page->slots_buffer_address(), slot, mode)) { - EvictEvacuationCandidate(object_page); + EvictPopularEvacuationCandidate(object_page); } } } |