| OLD | NEW |
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 break; | 84 break; |
| 85 case HEAP_NUMBER_TYPE: | 85 case HEAP_NUMBER_TYPE: |
| 86 HeapNumber::cast(this)->HeapNumberVerify(); | 86 HeapNumber::cast(this)->HeapNumberVerify(); |
| 87 break; | 87 break; |
| 88 case FIXED_ARRAY_TYPE: | 88 case FIXED_ARRAY_TYPE: |
| 89 FixedArray::cast(this)->FixedArrayVerify(); | 89 FixedArray::cast(this)->FixedArrayVerify(); |
| 90 break; | 90 break; |
| 91 case BYTE_ARRAY_TYPE: | 91 case BYTE_ARRAY_TYPE: |
| 92 ByteArray::cast(this)->ByteArrayVerify(); | 92 ByteArray::cast(this)->ByteArrayVerify(); |
| 93 break; | 93 break; |
| 94 case PIXEL_ARRAY_TYPE: | 94 case EXTERNAL_PIXEL_ARRAY_TYPE: |
| 95 PixelArray::cast(this)->PixelArrayVerify(); | 95 ExternalPixelArray::cast(this)->ExternalPixelArrayVerify(); |
| 96 break; | 96 break; |
| 97 case EXTERNAL_BYTE_ARRAY_TYPE: | 97 case EXTERNAL_BYTE_ARRAY_TYPE: |
| 98 ExternalByteArray::cast(this)->ExternalByteArrayVerify(); | 98 ExternalByteArray::cast(this)->ExternalByteArrayVerify(); |
| 99 break; | 99 break; |
| 100 case EXTERNAL_UNSIGNED_BYTE_ARRAY_TYPE: | 100 case EXTERNAL_UNSIGNED_BYTE_ARRAY_TYPE: |
| 101 ExternalUnsignedByteArray::cast(this)->ExternalUnsignedByteArrayVerify(); | 101 ExternalUnsignedByteArray::cast(this)->ExternalUnsignedByteArrayVerify(); |
| 102 break; | 102 break; |
| 103 case EXTERNAL_SHORT_ARRAY_TYPE: | 103 case EXTERNAL_SHORT_ARRAY_TYPE: |
| 104 ExternalShortArray::cast(this)->ExternalShortArrayVerify(); | 104 ExternalShortArray::cast(this)->ExternalShortArrayVerify(); |
| 105 break; | 105 break; |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 void HeapNumber::HeapNumberVerify() { | 185 void HeapNumber::HeapNumberVerify() { |
| 186 ASSERT(IsHeapNumber()); | 186 ASSERT(IsHeapNumber()); |
| 187 } | 187 } |
| 188 | 188 |
| 189 | 189 |
| 190 void ByteArray::ByteArrayVerify() { | 190 void ByteArray::ByteArrayVerify() { |
| 191 ASSERT(IsByteArray()); | 191 ASSERT(IsByteArray()); |
| 192 } | 192 } |
| 193 | 193 |
| 194 | 194 |
| 195 void PixelArray::PixelArrayVerify() { | 195 void ExternalPixelArray::ExternalPixelArrayVerify() { |
| 196 ASSERT(IsPixelArray()); | 196 ASSERT(IsExternalPixelArray()); |
| 197 } | 197 } |
| 198 | 198 |
| 199 | 199 |
| 200 void ExternalByteArray::ExternalByteArrayVerify() { | 200 void ExternalByteArray::ExternalByteArrayVerify() { |
| 201 ASSERT(IsExternalByteArray()); | 201 ASSERT(IsExternalByteArray()); |
| 202 } | 202 } |
| 203 | 203 |
| 204 | 204 |
| 205 void ExternalUnsignedByteArray::ExternalUnsignedByteArrayVerify() { | 205 void ExternalUnsignedByteArray::ExternalUnsignedByteArrayVerify() { |
| 206 ASSERT(IsExternalUnsignedByteArray()); | 206 ASSERT(IsExternalUnsignedByteArray()); |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 255 instance_size() < Heap::Capacity())); | 255 instance_size() < Heap::Capacity())); |
| 256 VerifyHeapPointer(prototype()); | 256 VerifyHeapPointer(prototype()); |
| 257 VerifyHeapPointer(instance_descriptors()); | 257 VerifyHeapPointer(instance_descriptors()); |
| 258 } | 258 } |
| 259 | 259 |
| 260 | 260 |
| 261 void Map::SharedMapVerify() { | 261 void Map::SharedMapVerify() { |
| 262 MapVerify(); | 262 MapVerify(); |
| 263 ASSERT(is_shared()); | 263 ASSERT(is_shared()); |
| 264 ASSERT_EQ(Heap::empty_descriptor_array(), instance_descriptors()); | 264 ASSERT_EQ(Heap::empty_descriptor_array(), instance_descriptors()); |
| 265 ASSERT_EQ(Heap::empty_fixed_array(), code_cache()); | |
| 266 ASSERT_EQ(0, pre_allocated_property_fields()); | 265 ASSERT_EQ(0, pre_allocated_property_fields()); |
| 267 ASSERT_EQ(0, unused_property_fields()); | 266 ASSERT_EQ(0, unused_property_fields()); |
| 268 ASSERT_EQ(StaticVisitorBase::GetVisitorId(instance_type(), instance_size()), | 267 ASSERT_EQ(StaticVisitorBase::GetVisitorId(instance_type(), instance_size()), |
| 269 visitor_id()); | 268 visitor_id()); |
| 270 } | 269 } |
| 271 | 270 |
| 272 | 271 |
| 273 void CodeCache::CodeCacheVerify() { | 272 void CodeCache::CodeCacheVerify() { |
| 274 VerifyHeapPointer(default_cache()); | 273 VerifyHeapPointer(default_cache()); |
| 275 VerifyHeapPointer(normal_type_cache()); | 274 VerifyHeapPointer(normal_type_cache()); |
| (...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 591 int holes = 0; | 590 int holes = 0; |
| 592 FixedArray* e = FixedArray::cast(elements()); | 591 FixedArray* e = FixedArray::cast(elements()); |
| 593 int len = e->length(); | 592 int len = e->length(); |
| 594 for (int i = 0; i < len; i++) { | 593 for (int i = 0; i < len; i++) { |
| 595 if (e->get(i) == Heap::the_hole_value()) holes++; | 594 if (e->get(i) == Heap::the_hole_value()) holes++; |
| 596 } | 595 } |
| 597 info->number_of_fast_used_elements_ += len - holes; | 596 info->number_of_fast_used_elements_ += len - holes; |
| 598 info->number_of_fast_unused_elements_ += holes; | 597 info->number_of_fast_unused_elements_ += holes; |
| 599 break; | 598 break; |
| 600 } | 599 } |
| 601 case PIXEL_ELEMENTS: { | 600 case EXTERNAL_PIXEL_ELEMENTS: { |
| 602 info->number_of_objects_with_fast_elements_++; | 601 info->number_of_objects_with_fast_elements_++; |
| 603 PixelArray* e = PixelArray::cast(elements()); | 602 ExternalPixelArray* e = ExternalPixelArray::cast(elements()); |
| 604 info->number_of_fast_used_elements_ += e->length(); | 603 info->number_of_fast_used_elements_ += e->length(); |
| 605 break; | 604 break; |
| 606 } | 605 } |
| 607 case DICTIONARY_ELEMENTS: { | 606 case DICTIONARY_ELEMENTS: { |
| 608 NumberDictionary* dict = element_dictionary(); | 607 NumberDictionary* dict = element_dictionary(); |
| 609 info->number_of_slow_used_elements_ += dict->NumberOfElements(); | 608 info->number_of_slow_used_elements_ += dict->NumberOfElements(); |
| 610 info->number_of_slow_unused_elements_ += | 609 info->number_of_slow_unused_elements_ += |
| 611 dict->Capacity() - dict->NumberOfElements(); | 610 dict->Capacity() - dict->NumberOfElements(); |
| 612 break; | 611 break; |
| 613 } | 612 } |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 713 ASSERT(e->IsUndefined()); | 712 ASSERT(e->IsUndefined()); |
| 714 } | 713 } |
| 715 } | 714 } |
| 716 } | 715 } |
| 717 } | 716 } |
| 718 | 717 |
| 719 | 718 |
| 720 #endif // DEBUG | 719 #endif // DEBUG |
| 721 | 720 |
| 722 } } // namespace v8::internal | 721 } } // namespace v8::internal |
| OLD | NEW |