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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 crankshaft_codegen_bytes_generated_(0), | 126 crankshaft_codegen_bytes_generated_(0), |
127 gcs_since_last_deopt_(0), | 127 gcs_since_last_deopt_(0), |
128 #ifdef VERIFY_HEAP | 128 #ifdef VERIFY_HEAP |
129 no_weak_object_verification_scope_depth_(0), | 129 no_weak_object_verification_scope_depth_(0), |
130 #endif | 130 #endif |
131 allocation_sites_scratchpad_length_(0), | 131 allocation_sites_scratchpad_length_(0), |
132 promotion_queue_(this), | 132 promotion_queue_(this), |
133 configured_(false), | 133 configured_(false), |
134 external_string_table_(this), | 134 external_string_table_(this), |
135 chunks_queued_for_free_(NULL), | 135 chunks_queued_for_free_(NULL), |
136 gc_callbacks_depth_(0) { | 136 gc_callbacks_depth_(0), |
| 137 deserialization_complete_(false) { |
137 // Allow build-time customization of the max semispace size. Building | 138 // Allow build-time customization of the max semispace size. Building |
138 // V8 with snapshots and a non-default max semispace size is much | 139 // V8 with snapshots and a non-default max semispace size is much |
139 // easier if you can define it as part of the build environment. | 140 // easier if you can define it as part of the build environment. |
140 #if defined(V8_MAX_SEMISPACE_SIZE) | 141 #if defined(V8_MAX_SEMISPACE_SIZE) |
141 max_semi_space_size_ = reserved_semispace_size_ = V8_MAX_SEMISPACE_SIZE; | 142 max_semi_space_size_ = reserved_semispace_size_ = V8_MAX_SEMISPACE_SIZE; |
142 #endif | 143 #endif |
143 | 144 |
144 // Ensure old_generation_size_ is a multiple of kPageSize. | 145 // Ensure old_generation_size_ is a multiple of kPageSize. |
145 DCHECK(MB >= Page::kPageSize); | 146 DCHECK(MB >= Page::kPageSize); |
146 | 147 |
(...skipping 5034 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5181 | 5182 |
5182 // Set up the special root array entries containing the stack limits. | 5183 // Set up the special root array entries containing the stack limits. |
5183 // These are actually addresses, but the tag makes the GC ignore it. | 5184 // These are actually addresses, but the tag makes the GC ignore it. |
5184 roots_[kStackLimitRootIndex] = reinterpret_cast<Object*>( | 5185 roots_[kStackLimitRootIndex] = reinterpret_cast<Object*>( |
5185 (isolate_->stack_guard()->jslimit() & ~kSmiTagMask) | kSmiTag); | 5186 (isolate_->stack_guard()->jslimit() & ~kSmiTagMask) | kSmiTag); |
5186 roots_[kRealStackLimitRootIndex] = reinterpret_cast<Object*>( | 5187 roots_[kRealStackLimitRootIndex] = reinterpret_cast<Object*>( |
5187 (isolate_->stack_guard()->real_jslimit() & ~kSmiTagMask) | kSmiTag); | 5188 (isolate_->stack_guard()->real_jslimit() & ~kSmiTagMask) | kSmiTag); |
5188 } | 5189 } |
5189 | 5190 |
5190 | 5191 |
| 5192 void Heap::NotifyDeserializationComplete() { deserialization_complete_ = true; } |
| 5193 |
| 5194 |
5191 void Heap::TearDown() { | 5195 void Heap::TearDown() { |
5192 #ifdef VERIFY_HEAP | 5196 #ifdef VERIFY_HEAP |
5193 if (FLAG_verify_heap) { | 5197 if (FLAG_verify_heap) { |
5194 Verify(); | 5198 Verify(); |
5195 } | 5199 } |
5196 #endif | 5200 #endif |
5197 | 5201 |
5198 UpdateMaximumCommitted(); | 5202 UpdateMaximumCommitted(); |
5199 | 5203 |
5200 if (FLAG_print_cumulative_gc_stat) { | 5204 if (FLAG_print_cumulative_gc_stat) { |
(...skipping 952 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6153 static_cast<int>(object_sizes_last_time_[index])); | 6157 static_cast<int>(object_sizes_last_time_[index])); |
6154 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) | 6158 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) |
6155 #undef ADJUST_LAST_TIME_OBJECT_COUNT | 6159 #undef ADJUST_LAST_TIME_OBJECT_COUNT |
6156 | 6160 |
6157 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); | 6161 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); |
6158 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); | 6162 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); |
6159 ClearObjectStats(); | 6163 ClearObjectStats(); |
6160 } | 6164 } |
6161 } | 6165 } |
6162 } // namespace v8::internal | 6166 } // namespace v8::internal |
OLD | NEW |