OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/disasm.h" | 7 #include "src/disasm.h" |
8 #include "src/disassembler.h" | 8 #include "src/disassembler.h" |
9 #include "src/heap/objects-visiting.h" | 9 #include "src/heap/objects-visiting.h" |
10 #include "src/jsregexp.h" | 10 #include "src/jsregexp.h" |
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
301 VerifyHeapPointer(prototype()); | 301 VerifyHeapPointer(prototype()); |
302 VerifyHeapPointer(instance_descriptors()); | 302 VerifyHeapPointer(instance_descriptors()); |
303 SLOW_DCHECK(instance_descriptors()->IsSortedNoDuplicates()); | 303 SLOW_DCHECK(instance_descriptors()->IsSortedNoDuplicates()); |
304 if (HasTransitionArray()) { | 304 if (HasTransitionArray()) { |
305 SLOW_DCHECK(transitions()->IsSortedNoDuplicates()); | 305 SLOW_DCHECK(transitions()->IsSortedNoDuplicates()); |
306 SLOW_DCHECK(transitions()->IsConsistentWithBackPointers(this)); | 306 SLOW_DCHECK(transitions()->IsConsistentWithBackPointers(this)); |
307 } | 307 } |
308 } | 308 } |
309 | 309 |
310 | 310 |
311 void Map::SharedMapVerify() { | 311 void Map::DictionaryMapVerify() { |
312 MapVerify(); | 312 MapVerify(); |
313 CHECK(is_shared()); | 313 CHECK(is_dictionary_map()); |
314 CHECK(instance_descriptors()->IsEmpty()); | 314 CHECK(instance_descriptors()->IsEmpty()); |
315 CHECK_EQ(0, pre_allocated_property_fields()); | 315 CHECK_EQ(0, pre_allocated_property_fields()); |
316 CHECK_EQ(0, unused_property_fields()); | 316 CHECK_EQ(0, unused_property_fields()); |
317 CHECK_EQ(StaticVisitorBase::GetVisitorId(instance_type(), instance_size()), | 317 CHECK_EQ(StaticVisitorBase::GetVisitorId(instance_type(), instance_size()), |
318 visitor_id()); | 318 visitor_id()); |
319 } | 319 } |
320 | 320 |
321 | 321 |
322 void Map::VerifyOmittedMapChecks() { | 322 void Map::VerifyOmittedMapChecks() { |
323 if (!FLAG_omit_map_checks_for_leaf_maps) return; | 323 if (!FLAG_omit_map_checks_for_leaf_maps) return; |
(...skipping 681 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1005 } | 1005 } |
1006 } | 1006 } |
1007 | 1007 |
1008 | 1008 |
1009 void NormalizedMapCache::NormalizedMapCacheVerify() { | 1009 void NormalizedMapCache::NormalizedMapCacheVerify() { |
1010 FixedArray::cast(this)->FixedArrayVerify(); | 1010 FixedArray::cast(this)->FixedArrayVerify(); |
1011 if (FLAG_enable_slow_asserts) { | 1011 if (FLAG_enable_slow_asserts) { |
1012 for (int i = 0; i < length(); i++) { | 1012 for (int i = 0; i < length(); i++) { |
1013 Object* e = FixedArray::get(i); | 1013 Object* e = FixedArray::get(i); |
1014 if (e->IsMap()) { | 1014 if (e->IsMap()) { |
1015 Map::cast(e)->SharedMapVerify(); | 1015 Map::cast(e)->DictionaryMapVerify(); |
1016 } else { | 1016 } else { |
1017 CHECK(e->IsUndefined()); | 1017 CHECK(e->IsUndefined()); |
1018 } | 1018 } |
1019 } | 1019 } |
1020 } | 1020 } |
1021 } | 1021 } |
1022 | 1022 |
1023 | 1023 |
1024 void DebugInfo::DebugInfoVerify() { | 1024 void DebugInfo::DebugInfoVerify() { |
1025 CHECK(IsDebugInfo()); | 1025 CHECK(IsDebugInfo()); |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1194 for (int i = 0; i < number_of_transitions(); ++i) { | 1194 for (int i = 0; i < number_of_transitions(); ++i) { |
1195 if (!CheckOneBackPointer(current_map, GetTarget(i))) return false; | 1195 if (!CheckOneBackPointer(current_map, GetTarget(i))) return false; |
1196 } | 1196 } |
1197 return true; | 1197 return true; |
1198 } | 1198 } |
1199 | 1199 |
1200 | 1200 |
1201 #endif // DEBUG | 1201 #endif // DEBUG |
1202 | 1202 |
1203 } } // namespace v8::internal | 1203 } } // namespace v8::internal |
OLD | NEW |