Chromium Code Reviews| 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 723 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 734 // Finalizes an external string by deleting the associated external | 734 // Finalizes an external string by deleting the associated external |
| 735 // data and clearing the resource pointer. | 735 // data and clearing the resource pointer. |
| 736 inline void FinalizeExternalString(String* string); | 736 inline void FinalizeExternalString(String* string); |
| 737 | 737 |
| 738 // Initialize a filler object to keep the ability to iterate over the heap | 738 // Initialize a filler object to keep the ability to iterate over the heap |
| 739 // when introducing gaps within pages. | 739 // when introducing gaps within pages. |
| 740 void CreateFillerObjectAt(Address addr, int size); | 740 void CreateFillerObjectAt(Address addr, int size); |
| 741 | 741 |
| 742 bool CanMoveObjectStart(HeapObject* object); | 742 bool CanMoveObjectStart(HeapObject* object); |
| 743 | 743 |
| 744 // Indicates whether live bytes adjustment is triggered from within the GC | 744 // Indicates whether live bytes adjustment is triggered |
| 745 // code or from mutator code. | 745 // - from within the GC code before sweeping started (SWEEPING_IS_OFF), |
| 746 enum InvocationMode { FROM_GC, FROM_MUTATOR }; | 746 // - or from within GC (SWEEPING_STARTED), |
| 747 // - or mutator code (SWEEPING_STARTED). | |
| 748 enum InvocationMode { SWEEPING_IS_OFF, SWEEPING_STARTED }; | |
|
Hannes Payer (out of office)
2015/03/26 16:27:24
Can we call it SEQUENTIAL_TO_SWEEPER and CONCURREN
| |
| 747 | 749 |
| 748 // Maintain consistency of live bytes during incremental marking. | 750 // Maintain consistency of live bytes during incremental marking. |
| 749 void AdjustLiveBytes(Address address, int by, InvocationMode mode); | 751 void AdjustLiveBytes(Address address, int by, InvocationMode mode); |
| 750 | 752 |
| 751 // Trim the given array from the left. Note that this relocates the object | 753 // Trim the given array from the left. Note that this relocates the object |
| 752 // start and hence is only valid if there is only a single reference to it. | 754 // start and hence is only valid if there is only a single reference to it. |
| 753 FixedArrayBase* LeftTrimFixedArray(FixedArrayBase* obj, int elements_to_trim); | 755 FixedArrayBase* LeftTrimFixedArray(FixedArrayBase* obj, int elements_to_trim); |
| 754 | 756 |
| 755 // Trim the given array from the right. | 757 // Trim the given array from the right. |
| 756 template<Heap::InvocationMode mode> | 758 template<Heap::InvocationMode mode> |
| (...skipping 1869 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2626 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. | 2628 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. |
| 2627 | 2629 |
| 2628 private: | 2630 private: |
| 2629 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); | 2631 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); |
| 2630 }; | 2632 }; |
| 2631 #endif // DEBUG | 2633 #endif // DEBUG |
| 2632 } | 2634 } |
| 2633 } // namespace v8::internal | 2635 } // namespace v8::internal |
| 2634 | 2636 |
| 2635 #endif // V8_HEAP_HEAP_H_ | 2637 #endif // V8_HEAP_HEAP_H_ |
| OLD | NEW |