| 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 804 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 815 | 815 |
| 816 // Initialize a filler object to keep the ability to iterate over the heap | 816 // Initialize a filler object to keep the ability to iterate over the heap |
| 817 // when introducing gaps within pages. | 817 // when introducing gaps within pages. |
| 818 void CreateFillerObjectAt(Address addr, int size); | 818 void CreateFillerObjectAt(Address addr, int size); |
| 819 | 819 |
| 820 bool CanMoveObjectStart(HeapObject* object); | 820 bool CanMoveObjectStart(HeapObject* object); |
| 821 | 821 |
| 822 // Maintain consistency of live bytes during incremental marking. | 822 // Maintain consistency of live bytes during incremental marking. |
| 823 void AdjustLiveBytes(HeapObject* object, int by, InvocationMode mode); | 823 void AdjustLiveBytes(HeapObject* object, int by, InvocationMode mode); |
| 824 | 824 |
| 825 // Trim the given array from the left. Note that this relocates the object | |
| 826 // start and hence is only valid if there is only a single reference to it. | |
| 827 FixedArrayBase* LeftTrimFixedArray(FixedArrayBase* obj, int elements_to_trim); | |
| 828 | |
| 829 // Trim the given array from the right. | 825 // Trim the given array from the right. |
| 830 template<Heap::InvocationMode mode> | 826 template<Heap::InvocationMode mode> |
| 831 void RightTrimFixedArray(FixedArrayBase* obj, int elements_to_trim); | 827 void RightTrimFixedArray(FixedArrayBase* obj, int elements_to_trim); |
| 832 | 828 |
| 833 // Converts the given boolean condition to JavaScript boolean value. | 829 // Converts the given boolean condition to JavaScript boolean value. |
| 834 inline Object* ToBoolean(bool condition); | 830 inline Object* ToBoolean(bool condition); |
| 835 | 831 |
| 836 // Check whether the heap is currently iterable. | 832 // Check whether the heap is currently iterable. |
| 837 bool IsHeapIterable(); | 833 bool IsHeapIterable(); |
| 838 | 834 |
| (...skipping 1879 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2718 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. | 2714 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. |
| 2719 | 2715 |
| 2720 private: | 2716 private: |
| 2721 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); | 2717 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); |
| 2722 }; | 2718 }; |
| 2723 #endif // DEBUG | 2719 #endif // DEBUG |
| 2724 } | 2720 } |
| 2725 } // namespace v8::internal | 2721 } // namespace v8::internal |
| 2726 | 2722 |
| 2727 #endif // V8_HEAP_HEAP_H_ | 2723 #endif // V8_HEAP_HEAP_H_ |
| OLD | NEW |