Revision: 12204
Author: [email protected]
Date: Thu Jul 26 07:55:22 2012
Log: Extending map verification to also verify
LastAdded/DescriptorArray consistency.
Removed ASSERT now subsumed by extended map verification.
Review URL: https://chromiumcodereview.appspot.com/10827037
http://code.google.com/p/v8/source/detail?r=12204
Modified:
/branches/bleeding_edge/src/heap.cc
/branches/bleeding_edge/src/objects-debug.cc
/branches/bleeding_edge/src/objects.cc
=======================================
--- /branches/bleeding_edge/src/heap.cc Thu Jul 26 06:48:34 2012
+++ /branches/bleeding_edge/src/heap.cc Thu Jul 26 07:55:22 2012
@@ -4159,8 +4159,6 @@
MaybeObject* maybe_map = map->CopyDropDescriptors();
if (!maybe_map->To(&new_map)) return maybe_map;
- ASSERT(new_map->LastAdded() == Map::kNoneAdded);
-
// Set up the global object as a normalized object.
global->set_map(new_map);
global->set_properties(dictionary);
=======================================
--- /branches/bleeding_edge/src/objects-debug.cc Mon Jul 16 07:02:50 2012
+++ /branches/bleeding_edge/src/objects-debug.cc Thu Jul 26 07:55:22 2012
@@ -302,6 +302,12 @@
instance_size() < HEAP->Capacity()));
VerifyHeapPointer(prototype());
VerifyHeapPointer(instance_descriptors());
+ if (instance_descriptors()->number_of_descriptors() == 0) {
+ ASSERT(LastAdded() == kNoneAdded);
+ } else {
+ ASSERT(instance_descriptors()->GetDetails(LastAdded()).index() ==
+ instance_descriptors()->number_of_descriptors());
+ }
SLOW_ASSERT(instance_descriptors()->IsSortedNoDuplicates());
if (HasTransitionArray()) {
SLOW_ASSERT(transitions()->IsSortedNoDuplicates());
=======================================
--- /branches/bleeding_edge/src/objects.cc Thu Jul 26 06:48:34 2012
+++ /branches/bleeding_edge/src/objects.cc Thu Jul 26 07:55:22 2012
@@ -4872,7 +4872,7 @@
if (!maybe_result->To(&result)) return maybe_result;
if (last_added == kNoneAdded) {
- ASSERT(descriptors->IsEmpty());
+ ASSERT(descriptors->number_of_descriptors() == 0);
} else {
ASSERT(descriptors->GetDetails(last_added).index() ==
descriptors->number_of_descriptors());
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev