Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1060)

Side by Side Diff: src/spaces.cc

Issue 5745005: Provide baseline GC version. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 2764 matching lines...) Expand 10 before | Expand all | Expand 10 after
2775 #endif 2775 #endif
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 #ifndef BASELINE_GC
2785 if (will_compact) { 2786 if (will_compact) {
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();
2796 } 2797 }
2797 } 2798 }
2799 #endif
2798 } 2800 }
2799 2801
2800 2802
2801 #ifdef DEBUG 2803 #ifdef DEBUG
2802 void MapSpace::VerifyObject(HeapObject* object) { 2804 void MapSpace::VerifyObject(HeapObject* object) {
2803 // The object should be a map or a free-list node. 2805 // The object should be a map or a free-list node.
2804 ASSERT(object->IsMap() || object->IsByteArray()); 2806 ASSERT(object->IsMap() || object->IsByteArray());
2805 } 2807 }
2806 #endif 2808 #endif
2807 2809
(...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after
3245 for (HeapObject* obj = obj_it.next(); obj != NULL; obj = obj_it.next()) { 3247 for (HeapObject* obj = obj_it.next(); obj != NULL; obj = obj_it.next()) {
3246 if (obj->IsCode()) { 3248 if (obj->IsCode()) {
3247 Code* code = Code::cast(obj); 3249 Code* code = Code::cast(obj);
3248 code_kind_statistics[code->kind()] += code->Size(); 3250 code_kind_statistics[code->kind()] += code->Size();
3249 } 3251 }
3250 } 3252 }
3251 } 3253 }
3252 #endif // DEBUG 3254 #endif // DEBUG
3253 3255
3254 } } // namespace v8::internal 3256 } } // namespace v8::internal
OLDNEW
« src/ia32/codegen-ia32.cc ('K') | « src/spaces.h ('k') | src/spaces-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698