| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 767 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 778 void PagedSpace::Print() { } | 778 void PagedSpace::Print() { } |
| 779 #endif | 779 #endif |
| 780 | 780 |
| 781 | 781 |
| 782 #ifdef DEBUG | 782 #ifdef DEBUG |
| 783 void PagedSpace::Verify(ObjectVisitor* visitor) { | 783 void PagedSpace::Verify(ObjectVisitor* visitor) { |
| 784 // We can only iterate over the pages if they were swept precisely. | 784 // We can only iterate over the pages if they were swept precisely. |
| 785 if (was_swept_conservatively_) return; | 785 if (was_swept_conservatively_) return; |
| 786 | 786 |
| 787 bool allocation_pointer_found_in_space = | 787 bool allocation_pointer_found_in_space = |
| 788 (allocation_info_.top != allocation_info_.limit); | 788 (allocation_info_.top == allocation_info_.limit); |
| 789 PageIterator page_iterator(this); | 789 PageIterator page_iterator(this); |
| 790 while (page_iterator.has_next()) { | 790 while (page_iterator.has_next()) { |
| 791 Page* page = page_iterator.next(); | 791 Page* page = page_iterator.next(); |
| 792 ASSERT(page->owner() == this); | 792 ASSERT(page->owner() == this); |
| 793 if (page == Page::FromAllocationTop(allocation_info_.top)) { | 793 if (page == Page::FromAllocationTop(allocation_info_.top)) { |
| 794 allocation_pointer_found_in_space = true; | 794 allocation_pointer_found_in_space = true; |
| 795 } | 795 } |
| 796 ASSERT(page->WasSweptPrecisely()); | 796 ASSERT(page->WasSweptPrecisely()); |
| 797 HeapObjectIterator it(page, NULL); | 797 HeapObjectIterator it(page, NULL); |
| 798 Address end_of_previous_object = page->ObjectAreaStart(); | 798 Address end_of_previous_object = page->ObjectAreaStart(); |
| (...skipping 20 matching lines...) Expand all Loading... |
| 819 if (Marking::IsBlack(Marking::MarkBitFrom(object))) { | 819 if (Marking::IsBlack(Marking::MarkBitFrom(object))) { |
| 820 black_size += size; | 820 black_size += size; |
| 821 } | 821 } |
| 822 | 822 |
| 823 ASSERT(object->address() + size <= top); | 823 ASSERT(object->address() + size <= top); |
| 824 end_of_previous_object = object->address() + size; | 824 end_of_previous_object = object->address() + size; |
| 825 } | 825 } |
| 826 | 826 |
| 827 CHECK_LE(black_size, page->LiveBytes()); | 827 CHECK_LE(black_size, page->LiveBytes()); |
| 828 } | 828 } |
| 829 ASSERT(allocation_pointer_found_in_space); |
| 829 } | 830 } |
| 830 #endif | 831 #endif |
| 831 | 832 |
| 832 | 833 |
| 833 // ----------------------------------------------------------------------------- | 834 // ----------------------------------------------------------------------------- |
| 834 // NewSpace implementation | 835 // NewSpace implementation |
| 835 | 836 |
| 836 | 837 |
| 837 bool NewSpace::Setup(int reserved_semispace_capacity, | 838 bool NewSpace::Setup(int reserved_semispace_capacity, |
| 838 int maximum_semispace_capacity) { | 839 int maximum_semispace_capacity) { |
| (...skipping 1688 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2527 object->ShortPrint(); | 2528 object->ShortPrint(); |
| 2528 PrintF("\n"); | 2529 PrintF("\n"); |
| 2529 } | 2530 } |
| 2530 printf(" --------------------------------------\n"); | 2531 printf(" --------------------------------------\n"); |
| 2531 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes()); | 2532 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes()); |
| 2532 } | 2533 } |
| 2533 | 2534 |
| 2534 #endif // DEBUG | 2535 #endif // DEBUG |
| 2535 | 2536 |
| 2536 } } // namespace v8::internal | 2537 } } // namespace v8::internal |
| OLD | NEW |