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 #include <map> | 9 #include <map> |
10 | 10 |
(...skipping 809 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
820 void RepairFreeListsAfterDeserialization(); | 820 void RepairFreeListsAfterDeserialization(); |
821 | 821 |
822 // Move len elements within a given array from src_index index to dst_index | 822 // Move len elements within a given array from src_index index to dst_index |
823 // index. | 823 // index. |
824 void MoveElements(FixedArray* array, int dst_index, int src_index, int len); | 824 void MoveElements(FixedArray* array, int dst_index, int src_index, int len); |
825 | 825 |
826 // Initialize a filler object to keep the ability to iterate over the heap | 826 // Initialize a filler object to keep the ability to iterate over the heap |
827 // when introducing gaps within pages. | 827 // when introducing gaps within pages. |
828 void CreateFillerObjectAt(Address addr, int size); | 828 void CreateFillerObjectAt(Address addr, int size); |
829 | 829 |
830 bool CanMoveObjectStart(HeapObject* object); | |
831 | |
832 // Maintain consistency of live bytes during incremental marking. | 830 // Maintain consistency of live bytes during incremental marking. |
833 void AdjustLiveBytes(HeapObject* object, int by, InvocationMode mode); | 831 void AdjustLiveBytes(HeapObject* object, int by, InvocationMode mode); |
834 | 832 |
835 // Trim the given array from the left. Note that this relocates the object | |
836 // start and hence is only valid if there is only a single reference to it. | |
837 FixedArrayBase* LeftTrimFixedArray(FixedArrayBase* obj, int elements_to_trim); | |
838 | |
839 // Trim the given array from the right. | 833 // Trim the given array from the right. |
840 template<Heap::InvocationMode mode> | 834 template<Heap::InvocationMode mode> |
841 void RightTrimFixedArray(FixedArrayBase* obj, int elements_to_trim); | 835 void RightTrimFixedArray(FixedArrayBase* obj, int elements_to_trim); |
842 | 836 |
843 // Converts the given boolean condition to JavaScript boolean value. | 837 // Converts the given boolean condition to JavaScript boolean value. |
844 inline Object* ToBoolean(bool condition); | 838 inline Object* ToBoolean(bool condition); |
845 | 839 |
846 // Check whether the heap is currently iterable. | 840 // Check whether the heap is currently iterable. |
847 bool IsHeapIterable(); | 841 bool IsHeapIterable(); |
848 | 842 |
(...skipping 1877 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2726 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. | 2720 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. |
2727 | 2721 |
2728 private: | 2722 private: |
2729 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); | 2723 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); |
2730 }; | 2724 }; |
2731 #endif // DEBUG | 2725 #endif // DEBUG |
2732 } // namespace internal | 2726 } // namespace internal |
2733 } // namespace v8 | 2727 } // namespace v8 |
2734 | 2728 |
2735 #endif // V8_HEAP_HEAP_H_ | 2729 #endif // V8_HEAP_HEAP_H_ |
OLD | NEW |