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

Unified Diff: src/layout-descriptor.cc

Issue 919043002: Fix for the compilation issue in shared mode introduced by r26624 (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 10 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/layout-descriptor.h ('k') | src/objects-debug.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/layout-descriptor.cc
diff --git a/src/layout-descriptor.cc b/src/layout-descriptor.cc
index 70380ce1921eb567c8d5bd8b4e8d20308bfce67c..b9016472cd753a135674da63d3b75776e6f29313 100644
--- a/src/layout-descriptor.cc
+++ b/src/layout-descriptor.cc
@@ -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
« no previous file with comments | « src/layout-descriptor.h ('k') | src/objects-debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698