| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 631 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 642 ASSERT(!Heap::InNewSpace(this)); | 642 ASSERT(!Heap::InNewSpace(this)); |
| 643 ASSERT(FIRST_TYPE <= instance_type() && instance_type() <= LAST_TYPE); | 643 ASSERT(FIRST_TYPE <= instance_type() && instance_type() <= LAST_TYPE); |
| 644 ASSERT(instance_size() == kVariableSizeSentinel || | 644 ASSERT(instance_size() == kVariableSizeSentinel || |
| 645 (kPointerSize <= instance_size() && | 645 (kPointerSize <= instance_size() && |
| 646 instance_size() < Heap::Capacity())); | 646 instance_size() < Heap::Capacity())); |
| 647 VerifyHeapPointer(prototype()); | 647 VerifyHeapPointer(prototype()); |
| 648 VerifyHeapPointer(instance_descriptors()); | 648 VerifyHeapPointer(instance_descriptors()); |
| 649 } | 649 } |
| 650 | 650 |
| 651 | 651 |
| 652 void Map::NormalizedMapVerify() { | 652 void Map::SharedMapVerify() { |
| 653 MapVerify(); | 653 MapVerify(); |
| 654 ASSERT(is_shared()); |
| 654 ASSERT_EQ(Heap::empty_descriptor_array(), instance_descriptors()); | 655 ASSERT_EQ(Heap::empty_descriptor_array(), instance_descriptors()); |
| 655 ASSERT_EQ(Heap::empty_fixed_array(), code_cache()); | 656 ASSERT_EQ(Heap::empty_fixed_array(), code_cache()); |
| 656 ASSERT_EQ(0, pre_allocated_property_fields()); | 657 ASSERT_EQ(0, pre_allocated_property_fields()); |
| 657 ASSERT_EQ(0, unused_property_fields()); | 658 ASSERT_EQ(0, unused_property_fields()); |
| 658 ASSERT_EQ(StaticVisitorBase::GetVisitorId(instance_type(), instance_size()), | 659 ASSERT_EQ(StaticVisitorBase::GetVisitorId(instance_type(), instance_size()), |
| 659 visitor_id()); | 660 visitor_id()); |
| 660 } | 661 } |
| 661 | 662 |
| 662 | 663 |
| 663 void CodeCache::CodeCachePrint() { | 664 void CodeCache::CodeCachePrint() { |
| (...skipping 710 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1374 } | 1375 } |
| 1375 } | 1376 } |
| 1376 | 1377 |
| 1377 | 1378 |
| 1378 void NormalizedMapCache::NormalizedMapCacheVerify() { | 1379 void NormalizedMapCache::NormalizedMapCacheVerify() { |
| 1379 FixedArray::cast(this)->Verify(); | 1380 FixedArray::cast(this)->Verify(); |
| 1380 if (FLAG_enable_slow_asserts) { | 1381 if (FLAG_enable_slow_asserts) { |
| 1381 for (int i = 0; i < length(); i++) { | 1382 for (int i = 0; i < length(); i++) { |
| 1382 Object* e = get(i); | 1383 Object* e = get(i); |
| 1383 if (e->IsMap()) { | 1384 if (e->IsMap()) { |
| 1384 Map::cast(e)->NormalizedMapVerify(); | 1385 Map::cast(e)->SharedMapVerify(); |
| 1385 } else { | 1386 } else { |
| 1386 ASSERT(e->IsUndefined()); | 1387 ASSERT(e->IsUndefined()); |
| 1387 } | 1388 } |
| 1388 } | 1389 } |
| 1389 } | 1390 } |
| 1390 } | 1391 } |
| 1391 | 1392 |
| 1392 | 1393 |
| 1393 #endif // DEBUG | 1394 #endif // DEBUG |
| 1394 | 1395 |
| 1395 } } // namespace v8::internal | 1396 } } // namespace v8::internal |
| OLD | NEW |