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/heap/heap.h" | 5 #include "src/heap/heap.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/ast/scopeinfo.h" | 9 #include "src/ast/scopeinfo.h" |
10 #include "src/base/bits.h" | 10 #include "src/base/bits.h" |
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
419 void Heap::IncrementDeferredCount(v8::Isolate::UseCounterFeature feature) { | 419 void Heap::IncrementDeferredCount(v8::Isolate::UseCounterFeature feature) { |
420 deferred_counters_[feature]++; | 420 deferred_counters_[feature]++; |
421 } | 421 } |
422 | 422 |
423 | 423 |
424 void Heap::GarbageCollectionPrologue() { | 424 void Heap::GarbageCollectionPrologue() { |
425 { | 425 { |
426 AllowHeapAllocation for_the_first_part_of_prologue; | 426 AllowHeapAllocation for_the_first_part_of_prologue; |
427 gc_count_++; | 427 gc_count_++; |
428 | 428 |
429 if (FLAG_flush_code) { | |
430 mark_compact_collector()->EnableCodeFlushing(true); | |
431 } | |
432 | |
433 #ifdef VERIFY_HEAP | 429 #ifdef VERIFY_HEAP |
434 if (FLAG_verify_heap) { | 430 if (FLAG_verify_heap) { |
435 Verify(); | 431 Verify(); |
436 } | 432 } |
437 #endif | 433 #endif |
438 } | 434 } |
439 | 435 |
440 // Reset GC statistics. | 436 // Reset GC statistics. |
441 promoted_objects_size_ = 0; | 437 promoted_objects_size_ = 0; |
442 previous_semi_space_copied_object_size_ = semi_space_copied_object_size_; | 438 previous_semi_space_copied_object_size_ = semi_space_copied_object_size_; |
(...skipping 5660 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6103 } | 6099 } |
6104 | 6100 |
6105 | 6101 |
6106 // static | 6102 // static |
6107 int Heap::GetStaticVisitorIdForMap(Map* map) { | 6103 int Heap::GetStaticVisitorIdForMap(Map* map) { |
6108 return StaticVisitorBase::GetVisitorId(map); | 6104 return StaticVisitorBase::GetVisitorId(map); |
6109 } | 6105 } |
6110 | 6106 |
6111 } // namespace internal | 6107 } // namespace internal |
6112 } // namespace v8 | 6108 } // namespace v8 |
OLD | NEW |