| 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 2765 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2776 | 2776 |
| 2777 | 2777 |
| 2778 // ----------------------------------------------------------------------------- | 2778 // ----------------------------------------------------------------------------- |
| 2779 // MapSpace implementation | 2779 // MapSpace implementation |
| 2780 | 2780 |
| 2781 void MapSpace::PrepareForMarkCompact(bool will_compact) { | 2781 void MapSpace::PrepareForMarkCompact(bool will_compact) { |
| 2782 // Call prepare of the super class. | 2782 // Call prepare of the super class. |
| 2783 FixedSpace::PrepareForMarkCompact(will_compact); | 2783 FixedSpace::PrepareForMarkCompact(will_compact); |
| 2784 | 2784 |
| 2785 if (will_compact) { | 2785 if (will_compact) { |
| 2786 ASSERT(!FLAG_new_gc); |
| 2786 // Initialize map index entry. | 2787 // Initialize map index entry. |
| 2787 int page_count = 0; | 2788 int page_count = 0; |
| 2788 PageIterator it(this, PageIterator::ALL_PAGES); | 2789 PageIterator it(this, PageIterator::ALL_PAGES); |
| 2789 while (it.has_next()) { | 2790 while (it.has_next()) { |
| 2790 ASSERT_MAP_PAGE_INDEX(page_count); | 2791 ASSERT_MAP_PAGE_INDEX(page_count); |
| 2791 | 2792 |
| 2792 Page* p = it.next(); | 2793 Page* p = it.next(); |
| 2793 ASSERT(p->mc_page_index == page_count); | 2794 ASSERT(p->mc_page_index == page_count); |
| 2794 | 2795 |
| 2795 page_addresses_[page_count++] = p->address(); | 2796 page_addresses_[page_count++] = p->address(); |
| (...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3245 for (HeapObject* obj = obj_it.next(); obj != NULL; obj = obj_it.next()) { | 3246 for (HeapObject* obj = obj_it.next(); obj != NULL; obj = obj_it.next()) { |
| 3246 if (obj->IsCode()) { | 3247 if (obj->IsCode()) { |
| 3247 Code* code = Code::cast(obj); | 3248 Code* code = Code::cast(obj); |
| 3248 code_kind_statistics[code->kind()] += code->Size(); | 3249 code_kind_statistics[code->kind()] += code->Size(); |
| 3249 } | 3250 } |
| 3250 } | 3251 } |
| 3251 } | 3252 } |
| 3252 #endif // DEBUG | 3253 #endif // DEBUG |
| 3253 | 3254 |
| 3254 } } // namespace v8::internal | 3255 } } // namespace v8::internal |
| OLD | NEW |