Index: test/cctest/test-unboxed-doubles.cc |
diff --git a/test/cctest/test-unboxed-doubles.cc b/test/cctest/test-unboxed-doubles.cc |
index b6f6e1ff8729c202928a6860d9fa3bbd52a4175e..4989f8b53e97ccd7a6f4be490ed65f0eaa580375 100644 |
--- a/test/cctest/test-unboxed-doubles.cc |
+++ b/test/cctest/test-unboxed-doubles.cc |
@@ -1363,65 +1363,6 @@ TEST(LayoutDescriptorSharing) { |
} |
-TEST(StoreBufferScanOnScavenge) { |
- CcTest::InitializeVM(); |
- Isolate* isolate = CcTest::i_isolate(); |
- Factory* factory = isolate->factory(); |
- v8::HandleScope scope(CcTest::isolate()); |
- |
- Handle<FieldType> any_type = FieldType::Any(isolate); |
- Handle<Map> map = Map::Create(isolate, 10); |
- map = Map::CopyWithField(map, MakeName("prop", 0), any_type, NONE, |
- Representation::Double(), |
- INSERT_TRANSITION).ToHandleChecked(); |
- |
- // Create object in new space. |
- Handle<JSObject> obj = factory->NewJSObjectFromMap(map, NOT_TENURED); |
- |
- Handle<HeapNumber> heap_number = factory->NewHeapNumber(42.5); |
- obj->WriteToField(0, *heap_number); |
- |
- { |
- // Ensure the object is properly set up. |
- DescriptorArray* descriptors = map->instance_descriptors(); |
- CHECK(descriptors->GetDetails(0).representation().IsDouble()); |
- FieldIndex field_index = FieldIndex::ForDescriptor(*map, 0); |
- CHECK(field_index.is_inobject() && field_index.is_double()); |
- CHECK_EQ(FLAG_unbox_double_fields, map->IsUnboxedDoubleField(field_index)); |
- CHECK_EQ(42.5, GetDoubleFieldValue(*obj, field_index)); |
- } |
- CHECK(isolate->heap()->new_space()->Contains(*obj)); |
- |
- // Trigger GCs so that the newly allocated object moves to old gen. |
- CcTest::heap()->CollectGarbage(i::NEW_SPACE); // in survivor space now |
- CcTest::heap()->CollectGarbage(i::NEW_SPACE); // in old gen now |
- |
- CHECK(isolate->heap()->old_space()->Contains(*obj)); |
- |
- // Create temp object in the new space. |
- Handle<JSArray> temp = factory->NewJSArray(0, FAST_ELEMENTS); |
- CHECK(isolate->heap()->new_space()->Contains(*temp)); |
- |
- // Construct a double value that looks like a pointer to the new space object |
- // and store it into the obj. |
- Address fake_object = reinterpret_cast<Address>(*temp) + kPointerSize; |
- double boom_value = bit_cast<double>(fake_object); |
- |
- FieldIndex field_index = FieldIndex::ForDescriptor(obj->map(), 0); |
- Handle<HeapNumber> boom_number = factory->NewHeapNumber(boom_value, MUTABLE); |
- obj->FastPropertyAtPut(field_index, *boom_number); |
- |
- // Enforce scan on scavenge for the obj's page. |
- MemoryChunk* chunk = MemoryChunk::FromAddress(obj->address()); |
- chunk->set_scan_on_scavenge(true); |
- |
- // Trigger GCs and force evacuation. Should not crash there. |
- CcTest::heap()->CollectAllGarbage(); |
- |
- CHECK_EQ(boom_value, GetDoubleFieldValue(*obj, field_index)); |
-} |
- |
- |
static void TestWriteBarrier(Handle<Map> map, Handle<Map> new_map, |
int tagged_descriptor, int double_descriptor, |
bool check_tagged_value = true) { |