Commit d4cb046b authored by ishell@chromium.org's avatar ishell@chromium.org

Fix for the compilation issue in shared mode introduced by r26624

TBR=verwaest@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26627}
parent d202d79a
......@@ -256,5 +256,28 @@ bool LayoutDescriptorHelper::IsTagged(
DCHECK(offset_in_bytes < *out_end_of_contiguous_region_offset);
return tagged;
}
#ifdef VERIFY_HEAP
bool LayoutDescriptor::IsConsistentWithMap(Map* map) {
if (FLAG_unbox_double_fields) {
DescriptorArray* descriptors = map->instance_descriptors();
int nof_descriptors = map->NumberOfOwnDescriptors();
for (int i = 0; i < nof_descriptors; i++) {
PropertyDetails details = descriptors->GetDetails(i);
if (details.type() != DATA) continue;
FieldIndex field_index = FieldIndex::ForDescriptor(map, i);
bool tagged_expected =
!field_index.is_inobject() || !details.representation().IsDouble();
for (int bit = 0; bit < details.field_width_in_words(); bit++) {
bool tagged_actual = IsTagged(details.field_index() + bit);
DCHECK_EQ(tagged_expected, tagged_actual);
if (tagged_actual != tagged_expected) return false;
}
}
}
return true;
}
#endif
}
} // namespace v8::internal
......@@ -69,7 +69,7 @@ class LayoutDescriptor : public FixedTypedArray<Uint32ArrayTraits> {
// tagged (FastPointerLayout).
V8_INLINE static LayoutDescriptor* FastPointerLayout();
#ifdef DEBUG
#ifdef VERIFY_HEAP
// Check that this layout descriptor corresponds to given map.
bool IsConsistentWithMap(Map* map);
#endif
......
......@@ -1172,27 +1172,6 @@ bool DescriptorArray::IsSortedNoDuplicates(int valid_entries) {
}
bool LayoutDescriptor::IsConsistentWithMap(Map* map) {
if (FLAG_unbox_double_fields) {
DescriptorArray* descriptors = map->instance_descriptors();
int nof_descriptors = map->NumberOfOwnDescriptors();
for (int i = 0; i < nof_descriptors; i++) {
PropertyDetails details = descriptors->GetDetails(i);
if (details.type() != DATA) continue;
FieldIndex field_index = FieldIndex::ForDescriptor(map, i);
bool tagged_expected =
!field_index.is_inobject() || !details.representation().IsDouble();
for (int bit = 0; bit < details.field_width_in_words(); bit++) {
bool tagged_actual = IsTagged(details.field_index() + bit);
DCHECK_EQ(tagged_expected, tagged_actual);
if (tagged_actual != tagged_expected) return false;
}
}
}
return true;
}
bool TransitionArray::IsSortedNoDuplicates(int valid_entries) {
DCHECK(valid_entries == -1);
Name* prev_key = NULL;
......
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