| 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 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 304 VerifyHeapPointer(instance_descriptors()); | 304 VerifyHeapPointer(instance_descriptors()); |
| 305 DescriptorArray* descriptors = instance_descriptors(); | 305 DescriptorArray* descriptors = instance_descriptors(); |
| 306 for (int i = 0; i < NumberOfOwnDescriptors(); ++i) { | 306 for (int i = 0; i < NumberOfOwnDescriptors(); ++i) { |
| 307 CHECK_EQ(i, descriptors->GetDetails(i).descriptor_index() - 1); | 307 CHECK_EQ(i, descriptors->GetDetails(i).descriptor_index() - 1); |
| 308 } | 308 } |
| 309 SLOW_ASSERT(instance_descriptors()->IsSortedNoDuplicates()); | 309 SLOW_ASSERT(instance_descriptors()->IsSortedNoDuplicates()); |
| 310 if (HasTransitionArray()) { | 310 if (HasTransitionArray()) { |
| 311 SLOW_ASSERT(transitions()->IsSortedNoDuplicates()); | 311 SLOW_ASSERT(transitions()->IsSortedNoDuplicates()); |
| 312 SLOW_ASSERT(transitions()->IsConsistentWithBackPointers(this)); | 312 SLOW_ASSERT(transitions()->IsConsistentWithBackPointers(this)); |
| 313 } | 313 } |
| 314 ASSERT(!is_observed() || instance_type() < FIRST_JS_OBJECT_TYPE || |
| 315 instance_type() > LAST_JS_OBJECT_TYPE || |
| 316 has_slow_elements_kind() || has_external_array_elements()); |
| 314 } | 317 } |
| 315 | 318 |
| 316 | 319 |
| 317 void Map::SharedMapVerify() { | 320 void Map::SharedMapVerify() { |
| 318 MapVerify(); | 321 MapVerify(); |
| 319 CHECK(is_shared()); | 322 CHECK(is_shared()); |
| 320 CHECK(instance_descriptors()->IsEmpty()); | 323 CHECK(instance_descriptors()->IsEmpty()); |
| 321 CHECK_EQ(0, pre_allocated_property_fields()); | 324 CHECK_EQ(0, pre_allocated_property_fields()); |
| 322 CHECK_EQ(0, unused_property_fields()); | 325 CHECK_EQ(0, unused_property_fields()); |
| 323 CHECK_EQ(StaticVisitorBase::GetVisitorId(instance_type(), instance_size()), | 326 CHECK_EQ(StaticVisitorBase::GetVisitorId(instance_type(), instance_size()), |
| (...skipping 678 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1002 for (int i = 0; i < number_of_transitions(); ++i) { | 1005 for (int i = 0; i < number_of_transitions(); ++i) { |
| 1003 if (!CheckOneBackPointer(current_map, GetTarget(i))) return false; | 1006 if (!CheckOneBackPointer(current_map, GetTarget(i))) return false; |
| 1004 } | 1007 } |
| 1005 return true; | 1008 return true; |
| 1006 } | 1009 } |
| 1007 | 1010 |
| 1008 | 1011 |
| 1009 #endif // DEBUG | 1012 #endif // DEBUG |
| 1010 | 1013 |
| 1011 } } // namespace v8::internal | 1014 } } // namespace v8::internal |
| OLD | NEW |