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

Side by Side Diff: src/objects-debug.cc

Issue 10827037: Extending map verification to also verify LastAdded/DescriptorArray consistency. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments. Created 8 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/objects.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 295
296 296
297 void Map::MapVerify() { 297 void Map::MapVerify() {
298 ASSERT(!HEAP->InNewSpace(this)); 298 ASSERT(!HEAP->InNewSpace(this));
299 ASSERT(FIRST_TYPE <= instance_type() && instance_type() <= LAST_TYPE); 299 ASSERT(FIRST_TYPE <= instance_type() && instance_type() <= LAST_TYPE);
300 ASSERT(instance_size() == kVariableSizeSentinel || 300 ASSERT(instance_size() == kVariableSizeSentinel ||
301 (kPointerSize <= instance_size() && 301 (kPointerSize <= instance_size() &&
302 instance_size() < HEAP->Capacity())); 302 instance_size() < HEAP->Capacity()));
303 VerifyHeapPointer(prototype()); 303 VerifyHeapPointer(prototype());
304 VerifyHeapPointer(instance_descriptors()); 304 VerifyHeapPointer(instance_descriptors());
305 if (instance_descriptors()->number_of_descriptors() == 0) {
306 ASSERT(LastAdded() == kNoneAdded);
307 } else {
308 ASSERT(instance_descriptors()->GetDetails(LastAdded()).index() ==
309 instance_descriptors()->number_of_descriptors());
310 }
305 SLOW_ASSERT(instance_descriptors()->IsSortedNoDuplicates()); 311 SLOW_ASSERT(instance_descriptors()->IsSortedNoDuplicates());
306 if (HasTransitionArray()) { 312 if (HasTransitionArray()) {
307 SLOW_ASSERT(transitions()->IsSortedNoDuplicates()); 313 SLOW_ASSERT(transitions()->IsSortedNoDuplicates());
308 SLOW_ASSERT(transitions()->IsConsistentWithBackPointers(this)); 314 SLOW_ASSERT(transitions()->IsConsistentWithBackPointers(this));
309 } 315 }
310 } 316 }
311 317
312 318
313 void Map::SharedMapVerify() { 319 void Map::SharedMapVerify() {
314 MapVerify(); 320 MapVerify();
(...skipping 693 matching lines...) Expand 10 before | Expand all | Expand 10 after
1008 FixedArray* proto_transitions = GetPrototypeTransitions(); 1014 FixedArray* proto_transitions = GetPrototypeTransitions();
1009 MemsetPointer(proto_transitions->data_start(), 1015 MemsetPointer(proto_transitions->data_start(),
1010 GetHeap()->the_hole_value(), 1016 GetHeap()->the_hole_value(),
1011 proto_transitions->length()); 1017 proto_transitions->length());
1012 } 1018 }
1013 1019
1014 1020
1015 #endif // DEBUG 1021 #endif // DEBUG
1016 1022
1017 } } // namespace v8::internal 1023 } } // namespace v8::internal
OLDNEW
« 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