| Index: src/objects-debug.cc
|
| diff --git a/src/objects-debug.cc b/src/objects-debug.cc
|
| index 94957206548ec3d3ab63ee251526abcf96a042f5..0e670993e0d965f2624f6cff9b581bfe5bcacda8 100644
|
| --- a/src/objects-debug.cc
|
| +++ b/src/objects-debug.cc
|
| @@ -1169,13 +1169,15 @@ bool DescriptorArray::IsSortedNoDuplicates(int valid_entries) {
|
| for (int i = 0; i < number_of_descriptors(); i++) {
|
| Name* key = GetSortedKey(i);
|
| if (key == current_key) {
|
| - Print();
|
| + OFStream os(stdout);
|
| + PrintDescriptors(os);
|
| return false;
|
| }
|
| current_key = key;
|
| uint32_t hash = GetSortedKey(i)->Hash();
|
| if (hash < current) {
|
| - Print();
|
| + OFStream os(stdout);
|
| + PrintDescriptors(os);
|
| return false;
|
| }
|
| current = hash;
|
| @@ -1207,36 +1209,23 @@ bool LayoutDescriptor::IsConsistentWithMap(Map* map) {
|
|
|
| bool TransitionArray::IsSortedNoDuplicates(int valid_entries) {
|
| DCHECK(valid_entries == -1);
|
| - Name* prev_key = NULL;
|
| - bool prev_is_data_property = false;
|
| - PropertyAttributes prev_attributes = NONE;
|
| - uint32_t prev_hash = 0;
|
| + Name* current_key = NULL;
|
| + uint32_t current = 0;
|
| for (int i = 0; i < number_of_transitions(); i++) {
|
| Name* key = GetSortedKey(i);
|
| - uint32_t hash = key->Hash();
|
| - bool is_data_property = false;
|
| - PropertyAttributes attributes = NONE;
|
| - if (!IsSpecialTransition(key)) {
|
| - Map* target = GetTarget(i);
|
| - PropertyDetails details = GetTargetDetails(key, target);
|
| - is_data_property = details.type() == FIELD || details.type() == CONSTANT;
|
| - attributes = details.attributes();
|
| - } else {
|
| - // Duplicate entries are not allowed for non-property transitions.
|
| - CHECK_NE(prev_key, key);
|
| + if (key == current_key) {
|
| + OFStream os(stdout);
|
| + PrintTransitions(os);
|
| + return false;
|
| }
|
| -
|
| - int cmp =
|
| - CompareKeys(prev_key, prev_hash, prev_is_data_property, prev_attributes,
|
| - key, hash, is_data_property, attributes);
|
| - if (cmp >= 0) {
|
| - Print();
|
| + current_key = key;
|
| + uint32_t hash = GetSortedKey(i)->Hash();
|
| + if (hash < current) {
|
| + OFStream os(stdout);
|
| + PrintTransitions(os);
|
| return false;
|
| }
|
| - prev_key = key;
|
| - prev_hash = hash;
|
| - prev_attributes = attributes;
|
| - prev_is_data_property = is_data_property;
|
| + current = hash;
|
| }
|
| return true;
|
| }
|
|
|