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/base/atomicops.h" | 7 #include "src/base/atomicops.h" |
8 #include "src/base/bits.h" | 8 #include "src/base/bits.h" |
9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
10 #include "src/compilation-cache.h" | 10 #include "src/compilation-cache.h" |
(...skipping 4339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4350 } | 4350 } |
4351 } | 4351 } |
4352 | 4352 |
4353 | 4353 |
4354 void MarkCompactCollector::ParallelSweepSpacesComplete() { | 4354 void MarkCompactCollector::ParallelSweepSpacesComplete() { |
4355 ParallelSweepSpaceComplete(heap()->old_space()); | 4355 ParallelSweepSpaceComplete(heap()->old_space()); |
4356 } | 4356 } |
4357 | 4357 |
4358 | 4358 |
4359 void MarkCompactCollector::EnableCodeFlushing(bool enable) { | 4359 void MarkCompactCollector::EnableCodeFlushing(bool enable) { |
4360 if (isolate()->debug()->is_loaded() || | 4360 if (isolate()->debug()->is_active()) enable = false; |
4361 isolate()->debug()->has_break_points()) { | |
4362 enable = false; | |
4363 } | |
4364 | 4361 |
4365 if (enable) { | 4362 if (enable) { |
4366 if (code_flusher_ != NULL) return; | 4363 if (code_flusher_ != NULL) return; |
4367 code_flusher_ = new CodeFlusher(isolate()); | 4364 code_flusher_ = new CodeFlusher(isolate()); |
4368 } else { | 4365 } else { |
4369 if (code_flusher_ == NULL) return; | 4366 if (code_flusher_ == NULL) return; |
4370 code_flusher_->EvictAllCandidates(); | 4367 code_flusher_->EvictAllCandidates(); |
4371 delete code_flusher_; | 4368 delete code_flusher_; |
4372 code_flusher_ = NULL; | 4369 code_flusher_ = NULL; |
4373 } | 4370 } |
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4645 SlotsBuffer* buffer = *buffer_address; | 4642 SlotsBuffer* buffer = *buffer_address; |
4646 while (buffer != NULL) { | 4643 while (buffer != NULL) { |
4647 SlotsBuffer* next_buffer = buffer->next(); | 4644 SlotsBuffer* next_buffer = buffer->next(); |
4648 DeallocateBuffer(buffer); | 4645 DeallocateBuffer(buffer); |
4649 buffer = next_buffer; | 4646 buffer = next_buffer; |
4650 } | 4647 } |
4651 *buffer_address = NULL; | 4648 *buffer_address = NULL; |
4652 } | 4649 } |
4653 } // namespace internal | 4650 } // namespace internal |
4654 } // namespace v8 | 4651 } // namespace v8 |
OLD | NEW |