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

Unified Diff: test/cctest/test-heap.cc

Issue 1239383004: Revert "Directly remove slot buffer entries in deoptimized code objects." (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 5 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/mark-compact.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-heap.cc
diff --git a/test/cctest/test-heap.cc b/test/cctest/test-heap.cc
index eba265905a03a8ea5808601c343bcb8ae5e6c0c6..d31f13e5f5c8fef1c2136b5d865eb10afa61a47c 100644
--- a/test/cctest/test-heap.cc
+++ b/test/cctest/test-heap.cc
@@ -6009,49 +6009,3 @@ TEST(AllocationThroughput) {
throughput = tracer->AllocationThroughputInBytesPerMillisecond(100);
CHECK_EQ(2 * (counter3 - counter1) / (time3 - time1), throughput);
}
-
-
-TEST(SlotsBufferObjectSlotsRemoval) {
- CcTest::InitializeVM();
- v8::HandleScope scope(CcTest::isolate());
- Isolate* isolate = CcTest::i_isolate();
- Heap* heap = isolate->heap();
- Factory* factory = isolate->factory();
-
- SlotsBuffer* buffer = new SlotsBuffer(NULL);
- void* fake_object[1];
-
- Handle<FixedArray> array = factory->NewFixedArray(2, TENURED);
- CHECK(heap->old_space()->Contains(*array));
- array->set(0, reinterpret_cast<Object*>(fake_object), SKIP_WRITE_BARRIER);
-
- // Firstly, let's test the regular slots buffer entry.
- buffer->Add(HeapObject::RawField(*array, FixedArray::kHeaderSize));
- DCHECK(reinterpret_cast<void*>(buffer->Get(0)) ==
- HeapObject::RawField(*array, FixedArray::kHeaderSize));
- SlotsBuffer::RemoveObjectSlots(CcTest::i_isolate()->heap(), buffer,
- array->address(),
- array->address() + array->Size());
- DCHECK(reinterpret_cast<void*>(buffer->Get(0)) ==
- HeapObject::RawField(heap->empty_fixed_array(),
- FixedArrayBase::kLengthOffset));
-
- // Secondly, let's test the typed slots buffer entry.
- SlotsBuffer::AddTo(NULL, &buffer, SlotsBuffer::EMBEDDED_OBJECT_SLOT,
- array->address() + FixedArray::kHeaderSize,
- SlotsBuffer::FAIL_ON_OVERFLOW);
- DCHECK(reinterpret_cast<void*>(buffer->Get(1)) ==
- reinterpret_cast<Object**>(SlotsBuffer::EMBEDDED_OBJECT_SLOT));
- DCHECK(reinterpret_cast<void*>(buffer->Get(2)) ==
- HeapObject::RawField(*array, FixedArray::kHeaderSize));
- SlotsBuffer::RemoveObjectSlots(CcTest::i_isolate()->heap(), buffer,
- array->address(),
- array->address() + array->Size());
- DCHECK(reinterpret_cast<void*>(buffer->Get(1)) ==
- HeapObject::RawField(heap->empty_fixed_array(),
- FixedArrayBase::kLengthOffset));
- DCHECK(reinterpret_cast<void*>(buffer->Get(2)) ==
- HeapObject::RawField(heap->empty_fixed_array(),
- FixedArrayBase::kLengthOffset));
- delete buffer;
-}
« no previous file with comments | « src/heap/mark-compact.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698