OLD | NEW |
---|---|
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
8 #include "src/api.h" | 8 #include "src/api.h" |
9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
10 #include "src/base/once.h" | 10 #include "src/base/once.h" |
(...skipping 5244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
5255 if (!old_data_space_->SetUp()) return false; | 5255 if (!old_data_space_->SetUp()) return false; |
5256 | 5256 |
5257 if (!isolate_->code_range()->SetUp(code_range_size_)) return false; | 5257 if (!isolate_->code_range()->SetUp(code_range_size_)) return false; |
5258 | 5258 |
5259 // Initialize the code space, set its maximum capacity to the old | 5259 // Initialize the code space, set its maximum capacity to the old |
5260 // generation size. It needs executable memory. | 5260 // generation size. It needs executable memory. |
5261 code_space_ = | 5261 code_space_ = |
5262 new OldSpace(this, max_old_generation_size_, CODE_SPACE, EXECUTABLE); | 5262 new OldSpace(this, max_old_generation_size_, CODE_SPACE, EXECUTABLE); |
5263 if (code_space_ == NULL) return false; | 5263 if (code_space_ == NULL) return false; |
5264 if (!code_space_->SetUp()) return false; | 5264 if (!code_space_->SetUp()) return false; |
5265 isolate_->code_range()->ReserveEmergencyBlock(); | |
Hannes Payer (out of office)
2014/11/20 08:00:37
Can we do that after setting up code_range?
ulan
2014/11/20 13:49:30
Done.
| |
5265 | 5266 |
5266 // Initialize map space. | 5267 // Initialize map space. |
5267 map_space_ = new MapSpace(this, max_old_generation_size_, MAP_SPACE); | 5268 map_space_ = new MapSpace(this, max_old_generation_size_, MAP_SPACE); |
5268 if (map_space_ == NULL) return false; | 5269 if (map_space_ == NULL) return false; |
5269 if (!map_space_->SetUp()) return false; | 5270 if (!map_space_->SetUp()) return false; |
5270 | 5271 |
5271 // Initialize simple cell space. | 5272 // Initialize simple cell space. |
5272 cell_space_ = new CellSpace(this, max_old_generation_size_, CELL_SPACE); | 5273 cell_space_ = new CellSpace(this, max_old_generation_size_, CELL_SPACE); |
5273 if (cell_space_ == NULL) return false; | 5274 if (cell_space_ == NULL) return false; |
5274 if (!cell_space_->SetUp()) return false; | 5275 if (!cell_space_->SetUp()) return false; |
(...skipping 1033 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
6308 static_cast<int>(object_sizes_last_time_[index])); | 6309 static_cast<int>(object_sizes_last_time_[index])); |
6309 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) | 6310 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) |
6310 #undef ADJUST_LAST_TIME_OBJECT_COUNT | 6311 #undef ADJUST_LAST_TIME_OBJECT_COUNT |
6311 | 6312 |
6312 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); | 6313 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); |
6313 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); | 6314 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); |
6314 ClearObjectStats(); | 6315 ClearObjectStats(); |
6315 } | 6316 } |
6316 } | 6317 } |
6317 } // namespace v8::internal | 6318 } // namespace v8::internal |
OLD | NEW |