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 |
11 // Clients of this interface shouldn't depend on lots of heap internals. | 11 // Clients of this interface shouldn't depend on lots of heap internals. |
12 // Do not include anything from src/heap here! | 12 // Do not include anything from src/heap here! |
13 #include "src/allocation.h" | 13 #include "src/allocation.h" |
14 #include "src/assert-scope.h" | 14 #include "src/assert-scope.h" |
15 #include "src/atomic-utils.h" | 15 #include "src/atomic-utils.h" |
16 #include "src/globals.h" | 16 #include "src/globals.h" |
17 // TODO(mstarzinger): Three more includes to kill! | 17 // TODO(mstarzinger): Two more includes to kill! |
18 #include "src/heap/mark-compact.h" | |
19 #include "src/heap/spaces.h" | 18 #include "src/heap/spaces.h" |
20 #include "src/heap/store-buffer.h" | 19 #include "src/heap/store-buffer.h" |
21 #include "src/list.h" | 20 #include "src/list.h" |
22 | 21 |
23 namespace v8 { | 22 namespace v8 { |
24 namespace internal { | 23 namespace internal { |
25 | 24 |
26 // Defines all the roots in Heap. | 25 // Defines all the roots in Heap. |
27 #define STRONG_ROOT_LIST(V) \ | 26 #define STRONG_ROOT_LIST(V) \ |
28 V(Map, byte_array_map, ByteArrayMap) \ | 27 V(Map, byte_array_map, ByteArrayMap) \ |
(...skipping 1072 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1101 // Getters to other components. ============================================== | 1100 // Getters to other components. ============================================== |
1102 // =========================================================================== | 1101 // =========================================================================== |
1103 | 1102 |
1104 GCTracer* tracer() { return tracer_; } | 1103 GCTracer* tracer() { return tracer_; } |
1105 | 1104 |
1106 PromotionQueue* promotion_queue() { return &promotion_queue_; } | 1105 PromotionQueue* promotion_queue() { return &promotion_queue_; } |
1107 | 1106 |
1108 inline Isolate* isolate(); | 1107 inline Isolate* isolate(); |
1109 | 1108 |
1110 MarkCompactCollector* mark_compact_collector() { | 1109 MarkCompactCollector* mark_compact_collector() { |
1111 return &mark_compact_collector_; | 1110 return mark_compact_collector_; |
1112 } | 1111 } |
1113 | 1112 |
1114 // =========================================================================== | 1113 // =========================================================================== |
1115 // Root set access. ========================================================== | 1114 // Root set access. ========================================================== |
1116 // =========================================================================== | 1115 // =========================================================================== |
1117 | 1116 |
1118 // Heap root getters. | 1117 // Heap root getters. |
1119 #define ROOT_ACCESSOR(type, name, camel_name) inline type* name(); | 1118 #define ROOT_ACCESSOR(type, name, camel_name) inline type* name(); |
1120 ROOT_LIST(ROOT_ACCESSOR) | 1119 ROOT_LIST(ROOT_ACCESSOR) |
1121 #undef ROOT_ACCESSOR | 1120 #undef ROOT_ACCESSOR |
(...skipping 1150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2272 double sweeping_time_; | 2271 double sweeping_time_; |
2273 | 2272 |
2274 // Last time an idle notification happened. | 2273 // Last time an idle notification happened. |
2275 double last_idle_notification_time_; | 2274 double last_idle_notification_time_; |
2276 | 2275 |
2277 // Last time a garbage collection happened. | 2276 // Last time a garbage collection happened. |
2278 double last_gc_time_; | 2277 double last_gc_time_; |
2279 | 2278 |
2280 Scavenger* scavenge_collector_; | 2279 Scavenger* scavenge_collector_; |
2281 | 2280 |
2282 MarkCompactCollector mark_compact_collector_; | 2281 MarkCompactCollector* mark_compact_collector_; |
2283 | 2282 |
2284 StoreBuffer store_buffer_; | 2283 StoreBuffer store_buffer_; |
2285 | 2284 |
2286 IncrementalMarking* incremental_marking_; | 2285 IncrementalMarking* incremental_marking_; |
2287 | 2286 |
2288 GCIdleTimeHandler* gc_idle_time_handler_; | 2287 GCIdleTimeHandler* gc_idle_time_handler_; |
2289 | 2288 |
2290 MemoryReducer* memory_reducer_; | 2289 MemoryReducer* memory_reducer_; |
2291 | 2290 |
2292 ObjectStats* object_stats_; | 2291 ObjectStats* object_stats_; |
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2728 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. | 2727 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. |
2729 | 2728 |
2730 private: | 2729 private: |
2731 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); | 2730 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); |
2732 }; | 2731 }; |
2733 #endif // DEBUG | 2732 #endif // DEBUG |
2734 } // namespace internal | 2733 } // namespace internal |
2735 } // namespace v8 | 2734 } // namespace v8 |
2736 | 2735 |
2737 #endif // V8_HEAP_HEAP_H_ | 2736 #endif // V8_HEAP_HEAP_H_ |
OLD | NEW |