| OLD | NEW |
| 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 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 316 | 316 |
| 317 | 317 |
| 318 void Map::MapVerify() { | 318 void Map::MapVerify() { |
| 319 CHECK(!HEAP->InNewSpace(this)); | 319 CHECK(!HEAP->InNewSpace(this)); |
| 320 CHECK(FIRST_TYPE <= instance_type() && instance_type() <= LAST_TYPE); | 320 CHECK(FIRST_TYPE <= instance_type() && instance_type() <= LAST_TYPE); |
| 321 CHECK(instance_size() == kVariableSizeSentinel || | 321 CHECK(instance_size() == kVariableSizeSentinel || |
| 322 (kPointerSize <= instance_size() && | 322 (kPointerSize <= instance_size() && |
| 323 instance_size() < HEAP->Capacity())); | 323 instance_size() < HEAP->Capacity())); |
| 324 VerifyHeapPointer(prototype()); | 324 VerifyHeapPointer(prototype()); |
| 325 VerifyHeapPointer(instance_descriptors()); | 325 VerifyHeapPointer(instance_descriptors()); |
| 326 DescriptorArray* descriptors = instance_descriptors(); | |
| 327 for (int i = 0; i < NumberOfOwnDescriptors(); ++i) { | |
| 328 CHECK_EQ(i, descriptors->GetDetails(i).descriptor_index() - 1); | |
| 329 } | |
| 330 SLOW_ASSERT(instance_descriptors()->IsSortedNoDuplicates()); | 326 SLOW_ASSERT(instance_descriptors()->IsSortedNoDuplicates()); |
| 331 if (HasTransitionArray()) { | 327 if (HasTransitionArray()) { |
| 332 SLOW_ASSERT(transitions()->IsSortedNoDuplicates()); | 328 SLOW_ASSERT(transitions()->IsSortedNoDuplicates()); |
| 333 SLOW_ASSERT(transitions()->IsConsistentWithBackPointers(this)); | 329 SLOW_ASSERT(transitions()->IsConsistentWithBackPointers(this)); |
| 334 } | 330 } |
| 335 ASSERT(!is_observed() || instance_type() < FIRST_JS_OBJECT_TYPE || | 331 ASSERT(!is_observed() || instance_type() < FIRST_JS_OBJECT_TYPE || |
| 336 instance_type() > LAST_JS_OBJECT_TYPE || | 332 instance_type() > LAST_JS_OBJECT_TYPE || |
| 337 has_slow_elements_kind() || has_external_array_elements()); | 333 has_slow_elements_kind() || has_external_array_elements()); |
| 338 } | 334 } |
| 339 | 335 |
| (...skipping 771 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1111 for (int i = 0; i < number_of_transitions(); ++i) { | 1107 for (int i = 0; i < number_of_transitions(); ++i) { |
| 1112 if (!CheckOneBackPointer(current_map, GetTarget(i))) return false; | 1108 if (!CheckOneBackPointer(current_map, GetTarget(i))) return false; |
| 1113 } | 1109 } |
| 1114 return true; | 1110 return true; |
| 1115 } | 1111 } |
| 1116 | 1112 |
| 1117 | 1113 |
| 1118 #endif // DEBUG | 1114 #endif // DEBUG |
| 1119 | 1115 |
| 1120 } } // namespace v8::internal | 1116 } } // namespace v8::internal |
| OLD | NEW |