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

Unified Diff: src/objects-debug.cc

Issue 15411003: Don't track representations in context extensions. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 7 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/objects.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects-debug.cc
diff --git a/src/objects-debug.cc b/src/objects-debug.cc
index ecbf9d64200275cb8d0edc3964ed51ce2ef6cdc0..891f0d2302daee66039130097592cd9981b56564 100644
--- a/src/objects-debug.cc
+++ b/src/objects-debug.cc
@@ -306,6 +306,17 @@ void JSObject::JSObjectVerify() {
CHECK_EQ(map()->unused_property_fields(),
(map()->inobject_properties() + properties()->length() -
map()->NextFreePropertyIndex()));
+ DescriptorArray* descriptors = map()->instance_descriptors();
+ for (int i = 0; i < map()->NumberOfOwnDescriptors(); i++) {
+ if (descriptors->GetDetails(i).type() == FIELD) {
+ Representation r = descriptors->GetDetails(i).representation();
+ int field = descriptors->GetFieldIndex(i);
+ Object* value = RawFastPropertyAt(field);
+ if (r.IsSmi()) ASSERT(value->IsSmi());
+ if (r.IsDouble()) ASSERT(value->IsHeapNumber());
+ if (r.IsHeapObject()) ASSERT(value->IsHeapObject());
+ }
+ }
}
CHECK_EQ((map()->has_fast_smi_or_object_elements() ||
(elements() == GetHeap()->empty_fixed_array())),
« no previous file with comments | « src/objects.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698