| 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 894 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 905 return lo_space(); | 905 return lo_space(); |
| 906 default: | 906 default: |
| 907 return paged_space(idx); | 907 return paged_space(idx); |
| 908 } | 908 } |
| 909 } | 909 } |
| 910 | 910 |
| 911 // Returns name of the space. | 911 // Returns name of the space. |
| 912 const char* GetSpaceName(int idx); | 912 const char* GetSpaceName(int idx); |
| 913 | 913 |
| 914 // =========================================================================== | 914 // =========================================================================== |
| 915 // API. ====================================================================== | 915 // Embedder heap tracing. ==================================================== |
| 916 // =========================================================================== | 916 // =========================================================================== |
| 917 | 917 |
| 918 void SetEmbedderHeapTracer(EmbedderHeapTracer* tracer); | 918 void SetEmbedderHeapTracer(EmbedderHeapTracer* tracer); |
| 919 | 919 |
| 920 EmbedderHeapTracer* embedder_heap_tracer() { return embedder_heap_tracer_; } |
| 921 |
| 922 bool UsingEmbedderHeapTracer() { |
| 923 return FLAG_trace_embedder_heap && embedder_heap_tracer_; |
| 924 } |
| 925 |
| 926 void TracePossibleWrapper(JSObject* js_object); |
| 927 |
| 920 void RegisterExternallyReferencedObject(Object** object); | 928 void RegisterExternallyReferencedObject(Object** object); |
| 921 | 929 |
| 922 // =========================================================================== | 930 // =========================================================================== |
| 923 // Getters to other components. ============================================== | 931 // Getters to other components. ============================================== |
| 924 // =========================================================================== | 932 // =========================================================================== |
| 925 | 933 |
| 926 GCTracer* tracer() { return tracer_; } | 934 GCTracer* tracer() { return tracer_; } |
| 927 | 935 |
| 928 MemoryAllocator* memory_allocator() { return memory_allocator_; } | 936 MemoryAllocator* memory_allocator() { return memory_allocator_; } |
| 929 | 937 |
| 930 EmbedderHeapTracer* embedder_heap_tracer() { return embedder_heap_tracer_; } | |
| 931 | |
| 932 PromotionQueue* promotion_queue() { return &promotion_queue_; } | 938 PromotionQueue* promotion_queue() { return &promotion_queue_; } |
| 933 | 939 |
| 934 inline Isolate* isolate(); | 940 inline Isolate* isolate(); |
| 935 | 941 |
| 936 MarkCompactCollector* mark_compact_collector() { | 942 MarkCompactCollector* mark_compact_collector() { |
| 937 return mark_compact_collector_; | 943 return mark_compact_collector_; |
| 938 } | 944 } |
| 939 | 945 |
| 940 // =========================================================================== | 946 // =========================================================================== |
| 941 // Root set access. ========================================================== | 947 // Root set access. ========================================================== |
| (...skipping 1719 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2661 friend class LargeObjectSpace; | 2667 friend class LargeObjectSpace; |
| 2662 friend class NewSpace; | 2668 friend class NewSpace; |
| 2663 friend class PagedSpace; | 2669 friend class PagedSpace; |
| 2664 DISALLOW_COPY_AND_ASSIGN(AllocationObserver); | 2670 DISALLOW_COPY_AND_ASSIGN(AllocationObserver); |
| 2665 }; | 2671 }; |
| 2666 | 2672 |
| 2667 } // namespace internal | 2673 } // namespace internal |
| 2668 } // namespace v8 | 2674 } // namespace v8 |
| 2669 | 2675 |
| 2670 #endif // V8_HEAP_HEAP_H_ | 2676 #endif // V8_HEAP_HEAP_H_ |
| OLD | NEW |