ifdefs around LayoutDescriptor::IsConsistenWithMap() removed.

This avoids potential mess with different compilation modes.

Review URL: https://codereview.chromium.org/934533002

Cr-Commit-Position: refs/heads/master@{#26656}
This commit is contained in:
ishell 2015-02-16 03:29:32 -08:00 committed by Commit bot
parent 56f9cca8f1
commit 6834d3abdf
3 changed files with 8 additions and 44 deletions

View File

@ -258,7 +258,6 @@ bool LayoutDescriptorHelper::IsTagged(
}
#ifdef VERIFY_HEAP
bool LayoutDescriptor::IsConsistentWithMap(Map* map) {
if (FLAG_unbox_double_fields) {
DescriptorArray* descriptors = map->instance_descriptors();
@ -278,6 +277,5 @@ bool LayoutDescriptor::IsConsistentWithMap(Map* map) {
}
return true;
}
#endif
}
} // namespace v8::internal

View File

@ -69,10 +69,8 @@ class LayoutDescriptor : public FixedTypedArray<Uint32ArrayTraits> {
// tagged (FastPointerLayout).
V8_INLINE static LayoutDescriptor* FastPointerLayout();
#ifdef VERIFY_HEAP
// Check that this layout descriptor corresponds to given map.
bool IsConsistentWithMap(Map* map);
#endif
#ifdef OBJECT_PRINT
// For our gdb macros, we should perhaps change these in the future.

View File

@ -30,11 +30,7 @@ static void InitializeVerifiedMapDescriptors(
Map* map, DescriptorArray* descriptors,
LayoutDescriptor* layout_descriptor) {
map->InitializeDescriptors(descriptors, layout_descriptor);
#ifdef VERIFY_HEAP
if (FLAG_verify_heap) {
DCHECK(layout_descriptor->IsConsistentWithMap(map));
}
#endif
CHECK(layout_descriptor->IsConsistentWithMap(map));
}
@ -228,11 +224,7 @@ TEST(LayoutDescriptorBasicSlow) {
}
CHECK(layout_desc->IsSlowLayout());
CHECK(!layout_desc->IsFastPointerLayout());
#ifdef VERIFY_HEAP
if (FLAG_verify_heap) {
DCHECK(layout_descriptor->IsConsistentWithMap(*map));
}
#endif
CHECK(layout_descriptor->IsConsistentWithMap(*map));
}
}
@ -646,11 +638,7 @@ static Handle<LayoutDescriptor> TestLayoutDescriptorAppend(
map->InitializeDescriptors(*descriptors, *layout_descriptor);
}
Handle<LayoutDescriptor> layout_descriptor(map->layout_descriptor(), isolate);
#ifdef VERIFY_HEAP
if (FLAG_verify_heap) {
DCHECK(layout_descriptor->IsConsistentWithMap(*map));
}
#endif
CHECK(layout_descriptor->IsConsistentWithMap(*map));
return layout_descriptor;
}
@ -777,20 +765,12 @@ static Handle<LayoutDescriptor> TestLayoutDescriptorAppendIfFastOrUseFull(
CHECK(layout_desc->IsTagged(field_index + field_width_in_words));
}
}
#ifdef VERIFY_HEAP
if (FLAG_verify_heap) {
DCHECK(map->layout_descriptor()->IsConsistentWithMap(*map));
}
#endif
CHECK(map->layout_descriptor()->IsConsistentWithMap(*map));
}
Handle<LayoutDescriptor> layout_descriptor(map->GetLayoutDescriptor(),
isolate);
#ifdef VERIFY_HEAP
if (FLAG_verify_heap) {
DCHECK(layout_descriptor->IsConsistentWithMap(*map));
}
#endif
CHECK(layout_descriptor->IsConsistentWithMap(*map));
return layout_descriptor;
}
@ -1151,11 +1131,7 @@ TEST(LayoutDescriptorSharing) {
}
Handle<LayoutDescriptor> split_layout_descriptor(
split_map->layout_descriptor(), isolate);
#ifdef VERIFY_HEAP
if (FLAG_verify_heap) {
DCHECK(split_layout_descriptor->IsConsistentWithMap(*split_map));
}
#endif
CHECK(split_layout_descriptor->IsConsistentWithMap(*split_map));
CHECK(split_layout_descriptor->IsSlowLayout());
CHECK(split_map->owns_descriptors());
@ -1168,11 +1144,7 @@ TEST(LayoutDescriptorSharing) {
// Layout descriptors should be shared with |split_map|.
CHECK(map1->owns_descriptors());
CHECK_EQ(*split_layout_descriptor, map1->layout_descriptor());
#ifdef VERIFY_HEAP
if (FLAG_verify_heap) {
DCHECK(map1->layout_descriptor()->IsConsistentWithMap(*map1));
}
#endif
CHECK(map1->layout_descriptor()->IsConsistentWithMap(*map1));
Handle<Map> map2 = Map::CopyWithField(split_map, MakeString("bar"), any_type,
NONE, Representation::Tagged(),
@ -1181,11 +1153,7 @@ TEST(LayoutDescriptorSharing) {
// Layout descriptors should not be shared with |split_map|.
CHECK(map2->owns_descriptors());
CHECK_NE(*split_layout_descriptor, map2->layout_descriptor());
#ifdef VERIFY_HEAP
if (FLAG_verify_heap) {
DCHECK(map2->layout_descriptor()->IsConsistentWithMap(*map2));
}
#endif
CHECK(map2->layout_descriptor()->IsConsistentWithMap(*map2));
}