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 754 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
765 | 765 |
766 bool CanMoveObjectStart(HeapObject* object); | 766 bool CanMoveObjectStart(HeapObject* object); |
767 | 767 |
768 // Indicates whether live bytes adjustment is triggered | 768 // Indicates whether live bytes adjustment is triggered |
769 // - from within the GC code before sweeping started (SEQUENTIAL_TO_SWEEPER), | 769 // - from within the GC code before sweeping started (SEQUENTIAL_TO_SWEEPER), |
770 // - or from within GC (CONCURRENT_TO_SWEEPER), | 770 // - or from within GC (CONCURRENT_TO_SWEEPER), |
771 // - or mutator code (CONCURRENT_TO_SWEEPER). | 771 // - or mutator code (CONCURRENT_TO_SWEEPER). |
772 enum InvocationMode { SEQUENTIAL_TO_SWEEPER, CONCURRENT_TO_SWEEPER }; | 772 enum InvocationMode { SEQUENTIAL_TO_SWEEPER, CONCURRENT_TO_SWEEPER }; |
773 | 773 |
774 // Maintain consistency of live bytes during incremental marking. | 774 // Maintain consistency of live bytes during incremental marking. |
775 void AdjustLiveBytes(Address address, int by, InvocationMode mode); | 775 void AdjustLiveBytes(HeapObject* object, int by, InvocationMode mode); |
776 | 776 |
777 // Trim the given array from the left. Note that this relocates the object | 777 // Trim the given array from the left. Note that this relocates the object |
778 // start and hence is only valid if there is only a single reference to it. | 778 // start and hence is only valid if there is only a single reference to it. |
779 FixedArrayBase* LeftTrimFixedArray(FixedArrayBase* obj, int elements_to_trim); | 779 FixedArrayBase* LeftTrimFixedArray(FixedArrayBase* obj, int elements_to_trim); |
780 | 780 |
781 // Trim the given array from the right. | 781 // Trim the given array from the right. |
782 template<Heap::InvocationMode mode> | 782 template<Heap::InvocationMode mode> |
783 void RightTrimFixedArray(FixedArrayBase* obj, int elements_to_trim); | 783 void RightTrimFixedArray(FixedArrayBase* obj, int elements_to_trim); |
784 | 784 |
785 // Converts the given boolean condition to JavaScript boolean value. | 785 // Converts the given boolean condition to JavaScript boolean value. |
(...skipping 2075 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2861 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. | 2861 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. |
2862 | 2862 |
2863 private: | 2863 private: |
2864 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); | 2864 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); |
2865 }; | 2865 }; |
2866 #endif // DEBUG | 2866 #endif // DEBUG |
2867 } | 2867 } |
2868 } // namespace v8::internal | 2868 } // namespace v8::internal |
2869 | 2869 |
2870 #endif // V8_HEAP_HEAP_H_ | 2870 #endif // V8_HEAP_HEAP_H_ |
OLD | NEW |