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 15 matching lines...) Expand all Loading... |
26 | 26 |
27 using v8::MemoryPressureLevel; | 27 using v8::MemoryPressureLevel; |
28 | 28 |
29 // Defines all the roots in Heap. | 29 // Defines all the roots in Heap. |
30 #define STRONG_ROOT_LIST(V) \ | 30 #define STRONG_ROOT_LIST(V) \ |
31 V(Map, byte_array_map, ByteArrayMap) \ | 31 V(Map, byte_array_map, ByteArrayMap) \ |
32 V(Map, free_space_map, FreeSpaceMap) \ | 32 V(Map, free_space_map, FreeSpaceMap) \ |
33 V(Map, one_pointer_filler_map, OnePointerFillerMap) \ | 33 V(Map, one_pointer_filler_map, OnePointerFillerMap) \ |
34 V(Map, two_pointer_filler_map, TwoPointerFillerMap) \ | 34 V(Map, two_pointer_filler_map, TwoPointerFillerMap) \ |
35 /* Cluster the most popular ones in a few cache lines here at the top. */ \ | 35 /* Cluster the most popular ones in a few cache lines here at the top. */ \ |
36 V(Smi, store_buffer_top, StoreBufferTop) \ | |
37 V(Oddball, undefined_value, UndefinedValue) \ | 36 V(Oddball, undefined_value, UndefinedValue) \ |
38 V(Oddball, the_hole_value, TheHoleValue) \ | 37 V(Oddball, the_hole_value, TheHoleValue) \ |
39 V(Oddball, null_value, NullValue) \ | 38 V(Oddball, null_value, NullValue) \ |
40 V(Oddball, true_value, TrueValue) \ | 39 V(Oddball, true_value, TrueValue) \ |
41 V(Oddball, false_value, FalseValue) \ | 40 V(Oddball, false_value, FalseValue) \ |
42 V(String, empty_string, empty_string) \ | 41 V(String, empty_string, empty_string) \ |
43 V(Oddball, uninitialized_value, UninitializedValue) \ | 42 V(Oddball, uninitialized_value, UninitializedValue) \ |
44 V(Map, cell_map, CellMap) \ | 43 V(Map, cell_map, CellMap) \ |
45 V(Map, global_property_cell_map, GlobalPropertyCellMap) \ | 44 V(Map, global_property_cell_map, GlobalPropertyCellMap) \ |
46 V(Map, shared_function_info_map, SharedFunctionInfoMap) \ | 45 V(Map, shared_function_info_map, SharedFunctionInfoMap) \ |
(...skipping 1026 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1073 Address end, bool record_slots, | 1072 Address end, bool record_slots, |
1074 ObjectSlotCallback callback); | 1073 ObjectSlotCallback callback); |
1075 | 1074 |
1076 // =========================================================================== | 1075 // =========================================================================== |
1077 // Store buffer API. ========================================================= | 1076 // Store buffer API. ========================================================= |
1078 // =========================================================================== | 1077 // =========================================================================== |
1079 | 1078 |
1080 // Write barrier support for object[offset] = o; | 1079 // Write barrier support for object[offset] = o; |
1081 inline void RecordWrite(Object* object, int offset, Object* o); | 1080 inline void RecordWrite(Object* object, int offset, Object* o); |
1082 | 1081 |
1083 Address* store_buffer_top_address() { | 1082 Address* store_buffer_top_address() { return store_buffer()->top_address(); } |
1084 return reinterpret_cast<Address*>(&roots_[kStoreBufferTopRootIndex]); | |
1085 } | |
1086 | 1083 |
1087 void ClearRecordedSlot(HeapObject* object, Object** slot); | 1084 void ClearRecordedSlot(HeapObject* object, Object** slot); |
1088 void ClearRecordedSlotRange(Address start, Address end); | 1085 void ClearRecordedSlotRange(Address start, Address end); |
1089 | 1086 |
1090 // =========================================================================== | 1087 // =========================================================================== |
1091 // Incremental marking API. ================================================== | 1088 // Incremental marking API. ================================================== |
1092 // =========================================================================== | 1089 // =========================================================================== |
1093 | 1090 |
1094 // Start incremental marking and ensure that idle time handler can perform | 1091 // Start incremental marking and ensure that idle time handler can perform |
1095 // incremental steps. | 1092 // incremental steps. |
(...skipping 1559 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2655 friend class LargeObjectSpace; | 2652 friend class LargeObjectSpace; |
2656 friend class NewSpace; | 2653 friend class NewSpace; |
2657 friend class PagedSpace; | 2654 friend class PagedSpace; |
2658 DISALLOW_COPY_AND_ASSIGN(AllocationObserver); | 2655 DISALLOW_COPY_AND_ASSIGN(AllocationObserver); |
2659 }; | 2656 }; |
2660 | 2657 |
2661 } // namespace internal | 2658 } // namespace internal |
2662 } // namespace v8 | 2659 } // namespace v8 |
2663 | 2660 |
2664 #endif // V8_HEAP_HEAP_H_ | 2661 #endif // V8_HEAP_HEAP_H_ |
OLD | NEW |