Commit 6834d3ab authored by ishell's avatar ishell Committed by Commit bot

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}
parent 56f9cca8
...@@ -258,7 +258,6 @@ bool LayoutDescriptorHelper::IsTagged( ...@@ -258,7 +258,6 @@ bool LayoutDescriptorHelper::IsTagged(
} }
#ifdef VERIFY_HEAP
bool LayoutDescriptor::IsConsistentWithMap(Map* map) { bool LayoutDescriptor::IsConsistentWithMap(Map* map) {
if (FLAG_unbox_double_fields) { if (FLAG_unbox_double_fields) {
DescriptorArray* descriptors = map->instance_descriptors(); DescriptorArray* descriptors = map->instance_descriptors();
...@@ -278,6 +277,5 @@ bool LayoutDescriptor::IsConsistentWithMap(Map* map) { ...@@ -278,6 +277,5 @@ bool LayoutDescriptor::IsConsistentWithMap(Map* map) {
} }
return true; return true;
} }
#endif
} }
} // namespace v8::internal } // namespace v8::internal
...@@ -69,10 +69,8 @@ class LayoutDescriptor : public FixedTypedArray<Uint32ArrayTraits> { ...@@ -69,10 +69,8 @@ class LayoutDescriptor : public FixedTypedArray<Uint32ArrayTraits> {
// tagged (FastPointerLayout). // tagged (FastPointerLayout).
V8_INLINE static LayoutDescriptor* FastPointerLayout(); V8_INLINE static LayoutDescriptor* FastPointerLayout();
#ifdef VERIFY_HEAP
// Check that this layout descriptor corresponds to given map. // Check that this layout descriptor corresponds to given map.
bool IsConsistentWithMap(Map* map); bool IsConsistentWithMap(Map* map);
#endif
#ifdef OBJECT_PRINT #ifdef OBJECT_PRINT
// For our gdb macros, we should perhaps change these in the future. // For our gdb macros, we should perhaps change these in the future.
......
...@@ -30,11 +30,7 @@ static void InitializeVerifiedMapDescriptors( ...@@ -30,11 +30,7 @@ static void InitializeVerifiedMapDescriptors(
Map* map, DescriptorArray* descriptors, Map* map, DescriptorArray* descriptors,
LayoutDescriptor* layout_descriptor) { LayoutDescriptor* layout_descriptor) {
map->InitializeDescriptors(descriptors, layout_descriptor); map->InitializeDescriptors(descriptors, layout_descriptor);
#ifdef VERIFY_HEAP CHECK(layout_descriptor->IsConsistentWithMap(map));
if (FLAG_verify_heap) {
DCHECK(layout_descriptor->IsConsistentWithMap(map));
}
#endif
} }
...@@ -228,11 +224,7 @@ TEST(LayoutDescriptorBasicSlow) { ...@@ -228,11 +224,7 @@ TEST(LayoutDescriptorBasicSlow) {
} }
CHECK(layout_desc->IsSlowLayout()); CHECK(layout_desc->IsSlowLayout());
CHECK(!layout_desc->IsFastPointerLayout()); CHECK(!layout_desc->IsFastPointerLayout());
#ifdef VERIFY_HEAP CHECK(layout_descriptor->IsConsistentWithMap(*map));
if (FLAG_verify_heap) {
DCHECK(layout_descriptor->IsConsistentWithMap(*map));
}
#endif
} }
} }
...@@ -646,11 +638,7 @@ static Handle<LayoutDescriptor> TestLayoutDescriptorAppend( ...@@ -646,11 +638,7 @@ static Handle<LayoutDescriptor> TestLayoutDescriptorAppend(
map->InitializeDescriptors(*descriptors, *layout_descriptor); map->InitializeDescriptors(*descriptors, *layout_descriptor);
} }
Handle<LayoutDescriptor> layout_descriptor(map->layout_descriptor(), isolate); Handle<LayoutDescriptor> layout_descriptor(map->layout_descriptor(), isolate);
#ifdef VERIFY_HEAP CHECK(layout_descriptor->IsConsistentWithMap(*map));
if (FLAG_verify_heap) {
DCHECK(layout_descriptor->IsConsistentWithMap(*map));
}
#endif
return layout_descriptor; return layout_descriptor;
} }
...@@ -777,20 +765,12 @@ static Handle<LayoutDescriptor> TestLayoutDescriptorAppendIfFastOrUseFull( ...@@ -777,20 +765,12 @@ static Handle<LayoutDescriptor> TestLayoutDescriptorAppendIfFastOrUseFull(
CHECK(layout_desc->IsTagged(field_index + field_width_in_words)); CHECK(layout_desc->IsTagged(field_index + field_width_in_words));
} }
} }
#ifdef VERIFY_HEAP CHECK(map->layout_descriptor()->IsConsistentWithMap(*map));
if (FLAG_verify_heap) {
DCHECK(map->layout_descriptor()->IsConsistentWithMap(*map));
}
#endif
} }
Handle<LayoutDescriptor> layout_descriptor(map->GetLayoutDescriptor(), Handle<LayoutDescriptor> layout_descriptor(map->GetLayoutDescriptor(),
isolate); isolate);
#ifdef VERIFY_HEAP CHECK(layout_descriptor->IsConsistentWithMap(*map));
if (FLAG_verify_heap) {
DCHECK(layout_descriptor->IsConsistentWithMap(*map));
}
#endif
return layout_descriptor; return layout_descriptor;
} }
...@@ -1151,11 +1131,7 @@ TEST(LayoutDescriptorSharing) { ...@@ -1151,11 +1131,7 @@ TEST(LayoutDescriptorSharing) {
} }
Handle<LayoutDescriptor> split_layout_descriptor( Handle<LayoutDescriptor> split_layout_descriptor(
split_map->layout_descriptor(), isolate); split_map->layout_descriptor(), isolate);
#ifdef VERIFY_HEAP CHECK(split_layout_descriptor->IsConsistentWithMap(*split_map));
if (FLAG_verify_heap) {
DCHECK(split_layout_descriptor->IsConsistentWithMap(*split_map));
}
#endif
CHECK(split_layout_descriptor->IsSlowLayout()); CHECK(split_layout_descriptor->IsSlowLayout());
CHECK(split_map->owns_descriptors()); CHECK(split_map->owns_descriptors());
...@@ -1168,11 +1144,7 @@ TEST(LayoutDescriptorSharing) { ...@@ -1168,11 +1144,7 @@ TEST(LayoutDescriptorSharing) {
// Layout descriptors should be shared with |split_map|. // Layout descriptors should be shared with |split_map|.
CHECK(map1->owns_descriptors()); CHECK(map1->owns_descriptors());
CHECK_EQ(*split_layout_descriptor, map1->layout_descriptor()); CHECK_EQ(*split_layout_descriptor, map1->layout_descriptor());
#ifdef VERIFY_HEAP CHECK(map1->layout_descriptor()->IsConsistentWithMap(*map1));
if (FLAG_verify_heap) {
DCHECK(map1->layout_descriptor()->IsConsistentWithMap(*map1));
}
#endif
Handle<Map> map2 = Map::CopyWithField(split_map, MakeString("bar"), any_type, Handle<Map> map2 = Map::CopyWithField(split_map, MakeString("bar"), any_type,
NONE, Representation::Tagged(), NONE, Representation::Tagged(),
...@@ -1181,11 +1153,7 @@ TEST(LayoutDescriptorSharing) { ...@@ -1181,11 +1153,7 @@ TEST(LayoutDescriptorSharing) {
// Layout descriptors should not be shared with |split_map|. // Layout descriptors should not be shared with |split_map|.
CHECK(map2->owns_descriptors()); CHECK(map2->owns_descriptors());
CHECK_NE(*split_layout_descriptor, map2->layout_descriptor()); CHECK_NE(*split_layout_descriptor, map2->layout_descriptor());
#ifdef VERIFY_HEAP CHECK(map2->layout_descriptor()->IsConsistentWithMap(*map2));
if (FLAG_verify_heap) {
DCHECK(map2->layout_descriptor()->IsConsistentWithMap(*map2));
}
#endif
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment