Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(329)

Side by Side Diff: src/heap/heap.h

Issue 2045263002: [heap] Avoid the use of cells to point from code to new-space objects. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add comments. Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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) \
192 V(PropertyCell, array_protector, ArrayProtector) \ 197 V(PropertyCell, array_protector, ArrayProtector) \
193 V(Cell, is_concat_spreadable_protector, IsConcatSpreadableProtector) \ 198 V(Cell, is_concat_spreadable_protector, IsConcatSpreadableProtector) \
194 V(PropertyCell, empty_property_cell, EmptyPropertyCell) \ 199 V(PropertyCell, empty_property_cell, EmptyPropertyCell) \
195 V(Object, weak_stack_trace_list, WeakStackTraceList) \ 200 V(Object, weak_stack_trace_list, WeakStackTraceList) \
196 V(Object, noscript_shared_function_infos, NoScriptSharedFunctionInfos) \ 201 V(Object, noscript_shared_function_infos, NoScriptSharedFunctionInfos) \
197 V(Map, bytecode_array_map, BytecodeArrayMap) \ 202 V(Map, bytecode_array_map, BytecodeArrayMap) \
198 V(WeakCell, empty_weak_cell, EmptyWeakCell) \ 203 V(WeakCell, empty_weak_cell, EmptyWeakCell) \
199 V(PropertyCell, has_instance_protector, HasInstanceProtector) \ 204 V(PropertyCell, has_instance_protector, HasInstanceProtector) \
200 V(Cell, species_protector, SpeciesProtector) 205 V(Cell, species_protector, SpeciesProtector)
201 206
(...skipping 629 matching lines...) Expand 10 before | Expand all | Expand 10 after
831 amount_of_external_allocated_memory_freed_.Value(); 836 amount_of_external_allocated_memory_freed_.Value();
832 amount_of_external_allocated_memory_freed_.SetValue(0); 837 amount_of_external_allocated_memory_freed_.SetValue(0);
833 } 838 }
834 839
835 void DeoptMarkedAllocationSites(); 840 void DeoptMarkedAllocationSites();
836 841
837 bool DeoptMaybeTenuredAllocationSites() { 842 bool DeoptMaybeTenuredAllocationSites() {
838 return new_space_.IsAtMaximumCapacity() && maximum_size_scavenges_ == 0; 843 return new_space_.IsAtMaximumCapacity() && maximum_size_scavenges_ == 0;
839 } 844 }
840 845
846 void AddWeakNewSpaceObjectToCodeDependency(Handle<HeapObject> obj,
847 Handle<WeakCell> code);
848
841 void AddWeakObjectToCodeDependency(Handle<HeapObject> obj, 849 void AddWeakObjectToCodeDependency(Handle<HeapObject> obj,
842 Handle<DependentCode> dep); 850 Handle<DependentCode> dep);
843 851
844 DependentCode* LookupWeakObjectToCodeDependency(Handle<HeapObject> obj); 852 DependentCode* LookupWeakObjectToCodeDependency(Handle<HeapObject> obj);
845 853
846 void CompactWeakFixedArrays(); 854 void CompactWeakFixedArrays();
847 855
848 void AddRetainedMap(Handle<Map> map); 856 void AddRetainedMap(Handle<Map> map);
849 857
850 // This event is triggered after successful allocation of a new object made 858 // This event is triggered after successful allocation of a new object made
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
1091 void IteratePromotedObjectPointers(HeapObject* object, Address start, 1099 void IteratePromotedObjectPointers(HeapObject* object, Address start,
1092 Address end, bool record_slots, 1100 Address end, bool record_slots,
1093 ObjectSlotCallback callback); 1101 ObjectSlotCallback callback);
1094 1102
1095 // =========================================================================== 1103 // ===========================================================================
1096 // Store buffer API. ========================================================= 1104 // Store buffer API. =========================================================
1097 // =========================================================================== 1105 // ===========================================================================
1098 1106
1099 // Write barrier support for object[offset] = o; 1107 // Write barrier support for object[offset] = o;
1100 inline void RecordWrite(Object* object, int offset, Object* o); 1108 inline void RecordWrite(Object* object, int offset, Object* o);
1109 inline void RecordWriteIntoCode(Code* host, RelocInfo* rinfo, Object* target);
1110 void RecordWriteIntoCodeSlow(Code* host, RelocInfo* rinfo, Object* target);
1101 inline void RecordFixedArrayElements(FixedArray* array, int offset, 1111 inline void RecordFixedArrayElements(FixedArray* array, int offset,
1102 int length); 1112 int length);
1103 1113
1104 Address* store_buffer_top_address() { return store_buffer()->top_address(); } 1114 Address* store_buffer_top_address() { return store_buffer()->top_address(); }
1105 1115
1106 void ClearRecordedSlot(HeapObject* object, Object** slot); 1116 void ClearRecordedSlot(HeapObject* object, Object** slot);
1107 void ClearRecordedSlotRange(Address start, Address end); 1117 void ClearRecordedSlotRange(Address start, Address end);
1108 1118
1109 // =========================================================================== 1119 // ===========================================================================
1110 // Incremental marking API. ================================================== 1120 // Incremental marking API. ==================================================
(...skipping 1559 matching lines...) Expand 10 before | Expand all | Expand 10 after
2670 friend class LargeObjectSpace; 2680 friend class LargeObjectSpace;
2671 friend class NewSpace; 2681 friend class NewSpace;
2672 friend class PagedSpace; 2682 friend class PagedSpace;
2673 DISALLOW_COPY_AND_ASSIGN(AllocationObserver); 2683 DISALLOW_COPY_AND_ASSIGN(AllocationObserver);
2674 }; 2684 };
2675 2685
2676 } // namespace internal 2686 } // namespace internal
2677 } // namespace v8 2687 } // namespace v8
2678 2688
2679 #endif // V8_HEAP_HEAP_H_ 2689 #endif // V8_HEAP_HEAP_H_
OLDNEW
« no previous file with comments | « src/compiler.cc ('k') | src/heap/heap.cc » ('j') | src/heap/mark-compact.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698