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

Side by Side Diff: src/heap.cc

Issue 7032005: Unify markbits for old and new spaces. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/gc
Patch Set: Created 9 years, 7 months 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 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 5056 matching lines...) Expand 10 before | Expand all | Expand 10 after
5067 cell_space_ = new CellSpace(this, max_old_generation_size_, CELL_SPACE); 5067 cell_space_ = new CellSpace(this, max_old_generation_size_, CELL_SPACE);
5068 if (cell_space_ == NULL) return false; 5068 if (cell_space_ == NULL) return false;
5069 if (!cell_space_->Setup()) return false; 5069 if (!cell_space_->Setup()) return false;
5070 5070
5071 // The large object code space may contain code or data. We set the memory 5071 // The large object code space may contain code or data. We set the memory
5072 // to be non-executable here for safety, but this means we need to enable it 5072 // to be non-executable here for safety, but this means we need to enable it
5073 // explicitly when allocating large code objects. 5073 // explicitly when allocating large code objects.
5074 lo_space_ = new LargeObjectSpace(this, LO_SPACE); 5074 lo_space_ = new LargeObjectSpace(this, LO_SPACE);
5075 if (lo_space_ == NULL) return false; 5075 if (lo_space_ == NULL) return false;
5076 if (!lo_space_->Setup()) return false; 5076 if (!lo_space_->Setup()) return false;
5077
5078 if (!marking()->Setup()) return false;
5079
5080 if (create_heap_objects) { 5077 if (create_heap_objects) {
5081 // Create initial maps. 5078 // Create initial maps.
5082 if (!CreateInitialMaps()) return false; 5079 if (!CreateInitialMaps()) return false;
5083 if (!CreateApiObjects()) return false; 5080 if (!CreateApiObjects()) return false;
5084 5081
5085 // Create initial objects 5082 // Create initial objects
5086 if (!CreateInitialObjects()) return false; 5083 if (!CreateInitialObjects()) return false;
5087 5084
5088 global_contexts_list_ = undefined_value(); 5085 global_contexts_list_ = undefined_value();
5089 } 5086 }
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
5167 delete cell_space_; 5164 delete cell_space_;
5168 cell_space_ = NULL; 5165 cell_space_ = NULL;
5169 } 5166 }
5170 5167
5171 if (lo_space_ != NULL) { 5168 if (lo_space_ != NULL) {
5172 lo_space_->TearDown(); 5169 lo_space_->TearDown();
5173 delete lo_space_; 5170 delete lo_space_;
5174 lo_space_ = NULL; 5171 lo_space_ = NULL;
5175 } 5172 }
5176 5173
5177 marking()->TearDown();
5178 store_buffer()->TearDown(); 5174 store_buffer()->TearDown();
5179 5175
5180 isolate_->memory_allocator()->TearDown(); 5176 isolate_->memory_allocator()->TearDown();
5181 5177
5182 #ifdef DEBUG 5178 #ifdef DEBUG
5183 delete debug_utils_; 5179 delete debug_utils_;
5184 debug_utils_ = NULL; 5180 debug_utils_ = NULL;
5185 #endif 5181 #endif
5186 } 5182 }
5187 5183
(...skipping 766 matching lines...) Expand 10 before | Expand all | Expand 10 after
5954 } 5950 }
5955 5951
5956 5952
5957 void ExternalStringTable::TearDown() { 5953 void ExternalStringTable::TearDown() {
5958 new_space_strings_.Free(); 5954 new_space_strings_.Free();
5959 old_space_strings_.Free(); 5955 old_space_strings_.Free();
5960 } 5956 }
5961 5957
5962 5958
5963 } } // namespace v8::internal 5959 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/assembler.cc ('k') | src/ia32/macro-assembler-ia32.h » ('j') | src/serialize.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698