| 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 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 EmptySlowElementDictionary) \ | 182 EmptySlowElementDictionary) \ |
| 183 V(FixedArray, materialized_objects, MaterializedObjects) \ | 183 V(FixedArray, materialized_objects, MaterializedObjects) \ |
| 184 V(FixedArray, microtask_queue, MicrotaskQueue) \ | 184 V(FixedArray, microtask_queue, MicrotaskQueue) \ |
| 185 V(TypeFeedbackVector, dummy_vector, DummyVector) \ | 185 V(TypeFeedbackVector, dummy_vector, DummyVector) \ |
| 186 V(FixedArray, empty_literals_array, EmptyLiteralsArray) \ | 186 V(FixedArray, empty_literals_array, EmptyLiteralsArray) \ |
| 187 V(FixedArray, empty_sloppy_arguments_elements, EmptySloppyArgumentsElements) \ | 187 V(FixedArray, empty_sloppy_arguments_elements, EmptySloppyArgumentsElements) \ |
| 188 V(FixedArray, cleared_optimized_code_map, ClearedOptimizedCodeMap) \ | 188 V(FixedArray, cleared_optimized_code_map, ClearedOptimizedCodeMap) \ |
| 189 V(FixedArray, detached_contexts, DetachedContexts) \ | 189 V(FixedArray, detached_contexts, DetachedContexts) \ |
| 190 V(ArrayList, retained_maps, RetainedMaps) \ | 190 V(ArrayList, retained_maps, RetainedMaps) \ |
| 191 V(WeakHashTable, weak_object_to_code_table, WeakObjectToCodeTable) \ | 191 V(WeakHashTable, weak_object_to_code_table, WeakObjectToCodeTable) \ |
| 192 /* weak_new_space_object_to_code_list is an array of weak cells, where */ \ | |
| 193 /* slots with even indices refer to the weak object, and the subsequent */ \ | |
| 194 /* slots refer to the code with the reference to the weak object. */ \ | |
| 195 V(ArrayList, weak_new_space_object_to_code_list, \ | |
| 196 WeakNewSpaceObjectToCodeList) \ | |
| 197 V(PropertyCell, array_protector, ArrayProtector) \ | 192 V(PropertyCell, array_protector, ArrayProtector) \ |
| 198 V(Cell, is_concat_spreadable_protector, IsConcatSpreadableProtector) \ | 193 V(Cell, is_concat_spreadable_protector, IsConcatSpreadableProtector) \ |
| 199 V(PropertyCell, empty_property_cell, EmptyPropertyCell) \ | 194 V(PropertyCell, empty_property_cell, EmptyPropertyCell) \ |
| 200 V(Object, weak_stack_trace_list, WeakStackTraceList) \ | 195 V(Object, weak_stack_trace_list, WeakStackTraceList) \ |
| 201 V(Object, noscript_shared_function_infos, NoScriptSharedFunctionInfos) \ | 196 V(Object, noscript_shared_function_infos, NoScriptSharedFunctionInfos) \ |
| 202 V(Map, bytecode_array_map, BytecodeArrayMap) \ | 197 V(Map, bytecode_array_map, BytecodeArrayMap) \ |
| 203 V(WeakCell, empty_weak_cell, EmptyWeakCell) \ | 198 V(WeakCell, empty_weak_cell, EmptyWeakCell) \ |
| 204 V(PropertyCell, has_instance_protector, HasInstanceProtector) \ | 199 V(PropertyCell, has_instance_protector, HasInstanceProtector) \ |
| 205 V(Cell, species_protector, SpeciesProtector) \ | 200 V(Cell, species_protector, SpeciesProtector) \ |
| 206 V(FixedArray, serialized_templates, SerializedTemplates) | 201 V(FixedArray, serialized_templates, SerializedTemplates) |
| (...skipping 630 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 837 external_memory_ -= external_memory_concurrently_freed_.Value(); | 832 external_memory_ -= external_memory_concurrently_freed_.Value(); |
| 838 external_memory_concurrently_freed_.SetValue(0); | 833 external_memory_concurrently_freed_.SetValue(0); |
| 839 } | 834 } |
| 840 | 835 |
| 841 void DeoptMarkedAllocationSites(); | 836 void DeoptMarkedAllocationSites(); |
| 842 | 837 |
| 843 bool DeoptMaybeTenuredAllocationSites() { | 838 bool DeoptMaybeTenuredAllocationSites() { |
| 844 return new_space_.IsAtMaximumCapacity() && maximum_size_scavenges_ == 0; | 839 return new_space_.IsAtMaximumCapacity() && maximum_size_scavenges_ == 0; |
| 845 } | 840 } |
| 846 | 841 |
| 847 void AddWeakNewSpaceObjectToCodeDependency(Handle<HeapObject> obj, | |
| 848 Handle<WeakCell> code); | |
| 849 | |
| 850 void AddWeakObjectToCodeDependency(Handle<HeapObject> obj, | 842 void AddWeakObjectToCodeDependency(Handle<HeapObject> obj, |
| 851 Handle<DependentCode> dep); | 843 Handle<DependentCode> dep); |
| 852 | 844 |
| 853 DependentCode* LookupWeakObjectToCodeDependency(Handle<HeapObject> obj); | 845 DependentCode* LookupWeakObjectToCodeDependency(Handle<HeapObject> obj); |
| 854 | 846 |
| 855 void CompactWeakFixedArrays(); | 847 void CompactWeakFixedArrays(); |
| 856 | 848 |
| 857 void AddRetainedMap(Handle<Map> map); | 849 void AddRetainedMap(Handle<Map> map); |
| 858 | 850 |
| 859 // This event is triggered after successful allocation of a new object made | 851 // This event is triggered after successful allocation of a new object made |
| (...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1100 void IteratePromotedObjectPointers(HeapObject* object, Address start, | 1092 void IteratePromotedObjectPointers(HeapObject* object, Address start, |
| 1101 Address end, bool record_slots, | 1093 Address end, bool record_slots, |
| 1102 ObjectSlotCallback callback); | 1094 ObjectSlotCallback callback); |
| 1103 | 1095 |
| 1104 // =========================================================================== | 1096 // =========================================================================== |
| 1105 // Store buffer API. ========================================================= | 1097 // Store buffer API. ========================================================= |
| 1106 // =========================================================================== | 1098 // =========================================================================== |
| 1107 | 1099 |
| 1108 // Write barrier support for object[offset] = o; | 1100 // Write barrier support for object[offset] = o; |
| 1109 inline void RecordWrite(Object* object, int offset, Object* o); | 1101 inline void RecordWrite(Object* object, int offset, Object* o); |
| 1110 inline void RecordWriteIntoCode(Code* host, RelocInfo* rinfo, Object* target); | |
| 1111 void RecordWriteIntoCodeSlow(Code* host, RelocInfo* rinfo, Object* target); | |
| 1112 inline void RecordFixedArrayElements(FixedArray* array, int offset, | 1102 inline void RecordFixedArrayElements(FixedArray* array, int offset, |
| 1113 int length); | 1103 int length); |
| 1114 | 1104 |
| 1115 Address* store_buffer_top_address() { return store_buffer()->top_address(); } | 1105 Address* store_buffer_top_address() { return store_buffer()->top_address(); } |
| 1116 | 1106 |
| 1117 void ClearRecordedSlot(HeapObject* object, Object** slot); | 1107 void ClearRecordedSlot(HeapObject* object, Object** slot); |
| 1118 void ClearRecordedSlotRange(Address start, Address end); | 1108 void ClearRecordedSlotRange(Address start, Address end); |
| 1119 | 1109 |
| 1120 // =========================================================================== | 1110 // =========================================================================== |
| 1121 // Incremental marking API. ================================================== | 1111 // Incremental marking API. ================================================== |
| (...skipping 1554 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2676 friend class LargeObjectSpace; | 2666 friend class LargeObjectSpace; |
| 2677 friend class NewSpace; | 2667 friend class NewSpace; |
| 2678 friend class PagedSpace; | 2668 friend class PagedSpace; |
| 2679 DISALLOW_COPY_AND_ASSIGN(AllocationObserver); | 2669 DISALLOW_COPY_AND_ASSIGN(AllocationObserver); |
| 2680 }; | 2670 }; |
| 2681 | 2671 |
| 2682 } // namespace internal | 2672 } // namespace internal |
| 2683 } // namespace v8 | 2673 } // namespace v8 |
| 2684 | 2674 |
| 2685 #endif // V8_HEAP_HEAP_H_ | 2675 #endif // V8_HEAP_HEAP_H_ |
| OLD | NEW |