Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(297)

Unified Diff: src/heap/mark-compact.cc

Issue 1961403002: Revert of [heap] Fine-grained JSArrayBuffer tracking (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/heap/heap.cc ('k') | src/heap/scavenger.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/mark-compact.cc
diff --git a/src/heap/mark-compact.cc b/src/heap/mark-compact.cc
index a7982d14b2ccf9341adbd5bccc57829788da77b0..89ca782c267b317fc64bcb27f4c9442bb6424a7d 100644
--- a/src/heap/mark-compact.cc
+++ b/src/heap/mark-compact.cc
@@ -1675,8 +1675,7 @@
// If we end up needing more special cases, we should factor this out.
if (V8_UNLIKELY(target_object->IsJSArrayBuffer())) {
heap_->array_buffer_tracker()->Promote(
- JSArrayBuffer::cast(target_object),
- reinterpret_cast<JSArrayBuffer*>(object));
+ JSArrayBuffer::cast(target_object));
}
promoted_size_ += size;
return true;
@@ -1685,9 +1684,7 @@
AllocationSpace space = AllocateTargetObject(object, &target);
MigrateObject(HeapObject::cast(target), object, size, space);
if (V8_UNLIKELY(target->IsJSArrayBuffer())) {
- heap_->array_buffer_tracker()->SemiSpaceCopy(
- JSArrayBuffer::cast(target),
- reinterpret_cast<JSArrayBuffer*>(object));
+ heap_->array_buffer_tracker()->MarkLive(JSArrayBuffer::cast(target));
}
semispace_copied_size_ += size;
return true;
@@ -1814,7 +1811,7 @@
inline bool Visit(HeapObject* object) {
if (V8_UNLIKELY(object->IsJSArrayBuffer())) {
object->GetHeap()->array_buffer_tracker()->Promote(
- JSArrayBuffer::cast(object), JSArrayBuffer::cast(object));
+ JSArrayBuffer::cast(object));
}
RecordMigratedSlotVisitor visitor;
object->IterateBodyFast(&visitor);
@@ -1841,15 +1838,7 @@
HeapObject* target_object = nullptr;
if (TryEvacuateObject(target_space, object, &target_object)) {
DCHECK(object->map_word().IsForwardingAddress());
- if (V8_UNLIKELY(target_object->IsJSArrayBuffer())) {
- heap_->array_buffer_tracker()->Compact(
- JSArrayBuffer::cast(target_object),
- reinterpret_cast<JSArrayBuffer*>(object));
- }
return true;
- }
- if (V8_UNLIKELY(object->IsJSArrayBuffer())) {
- heap_->array_buffer_tracker()->MarkLive(JSArrayBuffer::cast(object));
}
return false;
}
« no previous file with comments | « src/heap/heap.cc ('k') | src/heap/scavenger.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698