| 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/once.h" |
| 9 #include "src/bootstrapper.h" | 10 #include "src/bootstrapper.h" |
| 10 #include "src/codegen.h" | 11 #include "src/codegen.h" |
| 11 #include "src/compilation-cache.h" | 12 #include "src/compilation-cache.h" |
| 12 #include "src/conversions.h" | 13 #include "src/conversions.h" |
| 13 #include "src/cpu-profiler.h" | 14 #include "src/cpu-profiler.h" |
| 14 #include "src/debug.h" | 15 #include "src/debug.h" |
| 15 #include "src/deoptimizer.h" | 16 #include "src/deoptimizer.h" |
| 16 #include "src/global-handles.h" | 17 #include "src/global-handles.h" |
| 17 #include "src/heap-profiler.h" | 18 #include "src/heap-profiler.h" |
| 18 #include "src/incremental-marking.h" | 19 #include "src/incremental-marking.h" |
| 19 #include "src/isolate-inl.h" | 20 #include "src/isolate-inl.h" |
| 20 #include "src/mark-compact.h" | 21 #include "src/mark-compact.h" |
| 21 #include "src/natives.h" | 22 #include "src/natives.h" |
| 22 #include "src/objects-visiting.h" | 23 #include "src/objects-visiting.h" |
| 23 #include "src/objects-visiting-inl.h" | 24 #include "src/objects-visiting-inl.h" |
| 24 #include "src/once.h" | |
| 25 #include "src/runtime-profiler.h" | 25 #include "src/runtime-profiler.h" |
| 26 #include "src/scopeinfo.h" | 26 #include "src/scopeinfo.h" |
| 27 #include "src/snapshot.h" | 27 #include "src/snapshot.h" |
| 28 #include "src/store-buffer.h" | 28 #include "src/store-buffer.h" |
| 29 #include "src/utils/random-number-generator.h" | 29 #include "src/utils/random-number-generator.h" |
| 30 #include "src/utils.h" | 30 #include "src/utils.h" |
| 31 #include "src/v8threads.h" | 31 #include "src/v8threads.h" |
| 32 #include "src/vm-state-inl.h" | 32 #include "src/vm-state-inl.h" |
| 33 #if V8_TARGET_ARCH_ARM && !V8_INTERPRETED_REGEXP | 33 #if V8_TARGET_ARCH_ARM && !V8_INTERPRETED_REGEXP |
| 34 #include "src/regexp-macro-assembler.h" | 34 #include "src/regexp-macro-assembler.h" |
| (...skipping 5107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5142 // call Heap::TearDown() to release allocated memory. | 5142 // call Heap::TearDown() to release allocated memory. |
| 5143 // | 5143 // |
| 5144 // If the heap is not yet configured (e.g. through the API), configure it. | 5144 // If the heap is not yet configured (e.g. through the API), configure it. |
| 5145 // Configuration is based on the flags new-space-size (really the semispace | 5145 // Configuration is based on the flags new-space-size (really the semispace |
| 5146 // size) and old-space-size if set or the initial values of semispace_size_ | 5146 // size) and old-space-size if set or the initial values of semispace_size_ |
| 5147 // and old_generation_size_ otherwise. | 5147 // and old_generation_size_ otherwise. |
| 5148 if (!configured_) { | 5148 if (!configured_) { |
| 5149 if (!ConfigureHeapDefault()) return false; | 5149 if (!ConfigureHeapDefault()) return false; |
| 5150 } | 5150 } |
| 5151 | 5151 |
| 5152 CallOnce(&initialize_gc_once, &InitializeGCOnce); | 5152 base::CallOnce(&initialize_gc_once, &InitializeGCOnce); |
| 5153 | 5153 |
| 5154 MarkMapPointersAsEncoded(false); | 5154 MarkMapPointersAsEncoded(false); |
| 5155 | 5155 |
| 5156 // Set up memory allocator. | 5156 // Set up memory allocator. |
| 5157 if (!isolate_->memory_allocator()->SetUp(MaxReserved(), MaxExecutableSize())) | 5157 if (!isolate_->memory_allocator()->SetUp(MaxReserved(), MaxExecutableSize())) |
| 5158 return false; | 5158 return false; |
| 5159 | 5159 |
| 5160 // Set up new space. | 5160 // Set up new space. |
| 5161 if (!new_space_.SetUp(reserved_semispace_size_, max_semi_space_size_)) { | 5161 if (!new_space_.SetUp(reserved_semispace_size_, max_semi_space_size_)) { |
| 5162 return false; | 5162 return false; |
| (...skipping 1267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6430 static_cast<int>(object_sizes_last_time_[index])); | 6430 static_cast<int>(object_sizes_last_time_[index])); |
| 6431 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) | 6431 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) |
| 6432 #undef ADJUST_LAST_TIME_OBJECT_COUNT | 6432 #undef ADJUST_LAST_TIME_OBJECT_COUNT |
| 6433 | 6433 |
| 6434 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); | 6434 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); |
| 6435 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); | 6435 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); |
| 6436 ClearObjectStats(); | 6436 ClearObjectStats(); |
| 6437 } | 6437 } |
| 6438 | 6438 |
| 6439 } } // namespace v8::internal | 6439 } } // namespace v8::internal |
| OLD | NEW |