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 #ifndef V8_HEAP_HEAP_H_ | 5 #ifndef V8_HEAP_HEAP_H_ |
6 #define V8_HEAP_HEAP_H_ | 6 #define V8_HEAP_HEAP_H_ |
7 | 7 |
8 #include <cmath> | 8 #include <cmath> |
9 | 9 |
10 #include "src/allocation.h" | 10 #include "src/allocation.h" |
(...skipping 711 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
722 // Finalizes an external string by deleting the associated external | 722 // Finalizes an external string by deleting the associated external |
723 // data and clearing the resource pointer. | 723 // data and clearing the resource pointer. |
724 inline void FinalizeExternalString(String* string); | 724 inline void FinalizeExternalString(String* string); |
725 | 725 |
726 // Initialize a filler object to keep the ability to iterate over the heap | 726 // Initialize a filler object to keep the ability to iterate over the heap |
727 // when introducing gaps within pages. | 727 // when introducing gaps within pages. |
728 void CreateFillerObjectAt(Address addr, int size); | 728 void CreateFillerObjectAt(Address addr, int size); |
729 | 729 |
730 bool CanMoveObjectStart(HeapObject* object); | 730 bool CanMoveObjectStart(HeapObject* object); |
731 | 731 |
732 // Indicates whether live bytes adjustment is triggered from within the GC | 732 // Indicates whether live bytes adjustment is triggered |
733 // code or from mutator code. | 733 // - from within the GC code before sweeping started (SEQUENTIAL_TO_SWEEPER), |
734 enum InvocationMode { FROM_GC, FROM_MUTATOR }; | 734 // - or from within GC (CONCURRENT_TO_SWEEPER), |
| 735 // - or mutator code (CONCURRENT_TO_SWEEPER). |
| 736 enum InvocationMode { SEQUENTIAL_TO_SWEEPER, CONCURRENT_TO_SWEEPER }; |
735 | 737 |
736 // Maintain consistency of live bytes during incremental marking. | 738 // Maintain consistency of live bytes during incremental marking. |
737 void AdjustLiveBytes(Address address, int by, InvocationMode mode); | 739 void AdjustLiveBytes(Address address, int by, InvocationMode mode); |
738 | 740 |
739 // Trim the given array from the left. Note that this relocates the object | 741 // Trim the given array from the left. Note that this relocates the object |
740 // start and hence is only valid if there is only a single reference to it. | 742 // start and hence is only valid if there is only a single reference to it. |
741 FixedArrayBase* LeftTrimFixedArray(FixedArrayBase* obj, int elements_to_trim); | 743 FixedArrayBase* LeftTrimFixedArray(FixedArrayBase* obj, int elements_to_trim); |
742 | 744 |
743 // Trim the given array from the right. | 745 // Trim the given array from the right. |
744 template<Heap::InvocationMode mode> | 746 template<Heap::InvocationMode mode> |
(...skipping 1861 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2606 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. | 2608 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. |
2607 | 2609 |
2608 private: | 2610 private: |
2609 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); | 2611 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); |
2610 }; | 2612 }; |
2611 #endif // DEBUG | 2613 #endif // DEBUG |
2612 } | 2614 } |
2613 } // namespace v8::internal | 2615 } // namespace v8::internal |
2614 | 2616 |
2615 #endif // V8_HEAP_HEAP_H_ | 2617 #endif // V8_HEAP_HEAP_H_ |
OLD | NEW |