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): Two more includes to kill! | 17 // TODO(mstarzinger): Three more includes to kill! |
| 18 #include "src/heap/mark-compact.h" |
18 #include "src/heap/spaces.h" | 19 #include "src/heap/spaces.h" |
19 #include "src/heap/store-buffer.h" | 20 #include "src/heap/store-buffer.h" |
20 #include "src/list.h" | 21 #include "src/list.h" |
21 | 22 |
22 namespace v8 { | 23 namespace v8 { |
23 namespace internal { | 24 namespace internal { |
24 | 25 |
25 // Defines all the roots in Heap. | 26 // Defines all the roots in Heap. |
26 #define STRONG_ROOT_LIST(V) \ | 27 #define STRONG_ROOT_LIST(V) \ |
27 V(Map, byte_array_map, ByteArrayMap) \ | 28 V(Map, byte_array_map, ByteArrayMap) \ |
(...skipping 1064 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1092 // Getters to other components. ============================================== | 1093 // Getters to other components. ============================================== |
1093 // =========================================================================== | 1094 // =========================================================================== |
1094 | 1095 |
1095 GCTracer* tracer() { return tracer_; } | 1096 GCTracer* tracer() { return tracer_; } |
1096 | 1097 |
1097 PromotionQueue* promotion_queue() { return &promotion_queue_; } | 1098 PromotionQueue* promotion_queue() { return &promotion_queue_; } |
1098 | 1099 |
1099 inline Isolate* isolate(); | 1100 inline Isolate* isolate(); |
1100 | 1101 |
1101 MarkCompactCollector* mark_compact_collector() { | 1102 MarkCompactCollector* mark_compact_collector() { |
1102 return mark_compact_collector_; | 1103 return &mark_compact_collector_; |
1103 } | 1104 } |
1104 | 1105 |
1105 // =========================================================================== | 1106 // =========================================================================== |
1106 // Root set access. ========================================================== | 1107 // Root set access. ========================================================== |
1107 // =========================================================================== | 1108 // =========================================================================== |
1108 | 1109 |
1109 // Heap root getters. | 1110 // Heap root getters. |
1110 #define ROOT_ACCESSOR(type, name, camel_name) inline type* name(); | 1111 #define ROOT_ACCESSOR(type, name, camel_name) inline type* name(); |
1111 ROOT_LIST(ROOT_ACCESSOR) | 1112 ROOT_LIST(ROOT_ACCESSOR) |
1112 #undef ROOT_ACCESSOR | 1113 #undef ROOT_ACCESSOR |
(...skipping 1141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2254 double sweeping_time_; | 2255 double sweeping_time_; |
2255 | 2256 |
2256 // Last time an idle notification happened. | 2257 // Last time an idle notification happened. |
2257 double last_idle_notification_time_; | 2258 double last_idle_notification_time_; |
2258 | 2259 |
2259 // Last time a garbage collection happened. | 2260 // Last time a garbage collection happened. |
2260 double last_gc_time_; | 2261 double last_gc_time_; |
2261 | 2262 |
2262 Scavenger* scavenge_collector_; | 2263 Scavenger* scavenge_collector_; |
2263 | 2264 |
2264 MarkCompactCollector* mark_compact_collector_; | 2265 MarkCompactCollector mark_compact_collector_; |
2265 | 2266 |
2266 StoreBuffer store_buffer_; | 2267 StoreBuffer store_buffer_; |
2267 | 2268 |
2268 IncrementalMarking* incremental_marking_; | 2269 IncrementalMarking* incremental_marking_; |
2269 | 2270 |
2270 GCIdleTimeHandler* gc_idle_time_handler_; | 2271 GCIdleTimeHandler* gc_idle_time_handler_; |
2271 | 2272 |
2272 MemoryReducer* memory_reducer_; | 2273 MemoryReducer* memory_reducer_; |
2273 | 2274 |
2274 ObjectStats* object_stats_; | 2275 ObjectStats* object_stats_; |
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2710 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. | 2711 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. |
2711 | 2712 |
2712 private: | 2713 private: |
2713 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); | 2714 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); |
2714 }; | 2715 }; |
2715 #endif // DEBUG | 2716 #endif // DEBUG |
2716 } // namespace internal | 2717 } // namespace internal |
2717 } // namespace v8 | 2718 } // namespace v8 |
2718 | 2719 |
2719 #endif // V8_HEAP_HEAP_H_ | 2720 #endif // V8_HEAP_HEAP_H_ |
OLD | NEW |