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

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

Issue 2090983002: Revert of Reland [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: Created 4 years, 5 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
« no previous file with comments | « src/compiler.cc ('k') | src/heap/heap.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 V(NameDictionary, intrinsic_function_names, IntrinsicFunctionNames) \ 187 V(NameDictionary, intrinsic_function_names, IntrinsicFunctionNames) \
188 V(NameDictionary, empty_properties_dictionary, EmptyPropertiesDictionary) \ 188 V(NameDictionary, empty_properties_dictionary, EmptyPropertiesDictionary) \
189 V(Object, symbol_registry, SymbolRegistry) \ 189 V(Object, symbol_registry, SymbolRegistry) \
190 V(Object, script_list, ScriptList) \ 190 V(Object, script_list, ScriptList) \
191 V(UnseededNumberDictionary, code_stubs, CodeStubs) \ 191 V(UnseededNumberDictionary, code_stubs, CodeStubs) \
192 V(FixedArray, materialized_objects, MaterializedObjects) \ 192 V(FixedArray, materialized_objects, MaterializedObjects) \
193 V(FixedArray, microtask_queue, MicrotaskQueue) \ 193 V(FixedArray, microtask_queue, MicrotaskQueue) \
194 V(FixedArray, detached_contexts, DetachedContexts) \ 194 V(FixedArray, detached_contexts, DetachedContexts) \
195 V(ArrayList, retained_maps, RetainedMaps) \ 195 V(ArrayList, retained_maps, RetainedMaps) \
196 V(WeakHashTable, weak_object_to_code_table, WeakObjectToCodeTable) \ 196 V(WeakHashTable, weak_object_to_code_table, WeakObjectToCodeTable) \
197 /* weak_new_space_object_to_code_list is an array of weak cells, where */ \
198 /* slots with even indices refer to the weak object, and the subsequent */ \
199 /* slots refer to the code with the reference to the weak object. */ \
200 V(ArrayList, weak_new_space_object_to_code_list, \
201 WeakNewSpaceObjectToCodeList) \
202 V(Object, weak_stack_trace_list, WeakStackTraceList) \ 197 V(Object, weak_stack_trace_list, WeakStackTraceList) \
203 V(Object, noscript_shared_function_infos, NoScriptSharedFunctionInfos) \ 198 V(Object, noscript_shared_function_infos, NoScriptSharedFunctionInfos) \
204 V(FixedArray, serialized_templates, SerializedTemplates) \ 199 V(FixedArray, serialized_templates, SerializedTemplates) \
205 /* Configured values */ \ 200 /* Configured values */ \
206 V(JSObject, message_listeners, MessageListeners) \ 201 V(JSObject, message_listeners, MessageListeners) \
207 V(Code, js_entry_code, JsEntryCode) \ 202 V(Code, js_entry_code, JsEntryCode) \
208 V(Code, js_construct_entry_code, JsConstructEntryCode) \ 203 V(Code, js_construct_entry_code, JsConstructEntryCode) \
209 /* Oddball maps */ \ 204 /* Oddball maps */ \
210 V(Map, undefined_map, UndefinedMap) \ 205 V(Map, undefined_map, UndefinedMap) \
211 V(Map, the_hole_map, TheHoleMap) \ 206 V(Map, the_hole_map, TheHoleMap) \
(...skipping 646 matching lines...) Expand 10 before | Expand all | Expand 10 after
858 external_memory_ -= external_memory_concurrently_freed_.Value(); 853 external_memory_ -= external_memory_concurrently_freed_.Value();
859 external_memory_concurrently_freed_.SetValue(0); 854 external_memory_concurrently_freed_.SetValue(0);
860 } 855 }
861 856
862 void DeoptMarkedAllocationSites(); 857 void DeoptMarkedAllocationSites();
863 858
864 bool DeoptMaybeTenuredAllocationSites() { 859 bool DeoptMaybeTenuredAllocationSites() {
865 return new_space_.IsAtMaximumCapacity() && maximum_size_scavenges_ == 0; 860 return new_space_.IsAtMaximumCapacity() && maximum_size_scavenges_ == 0;
866 } 861 }
867 862
868 void AddWeakNewSpaceObjectToCodeDependency(Handle<HeapObject> obj,
869 Handle<WeakCell> code);
870
871 void AddWeakObjectToCodeDependency(Handle<HeapObject> obj, 863 void AddWeakObjectToCodeDependency(Handle<HeapObject> obj,
872 Handle<DependentCode> dep); 864 Handle<DependentCode> dep);
873 865
874 DependentCode* LookupWeakObjectToCodeDependency(Handle<HeapObject> obj); 866 DependentCode* LookupWeakObjectToCodeDependency(Handle<HeapObject> obj);
875 867
876 void CompactWeakFixedArrays(); 868 void CompactWeakFixedArrays();
877 869
878 void AddRetainedMap(Handle<Map> map); 870 void AddRetainedMap(Handle<Map> map);
879 871
880 // This event is triggered after successful allocation of a new object made 872 // This event is triggered after successful allocation of a new object made
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
1121 void IteratePromotedObjectPointers(HeapObject* object, Address start, 1113 void IteratePromotedObjectPointers(HeapObject* object, Address start,
1122 Address end, bool record_slots, 1114 Address end, bool record_slots,
1123 ObjectSlotCallback callback); 1115 ObjectSlotCallback callback);
1124 1116
1125 // =========================================================================== 1117 // ===========================================================================
1126 // Store buffer API. ========================================================= 1118 // Store buffer API. =========================================================
1127 // =========================================================================== 1119 // ===========================================================================
1128 1120
1129 // Write barrier support for object[offset] = o; 1121 // Write barrier support for object[offset] = o;
1130 inline void RecordWrite(Object* object, int offset, Object* o); 1122 inline void RecordWrite(Object* object, int offset, Object* o);
1131 inline void RecordWriteIntoCode(Code* host, RelocInfo* rinfo, Object* target);
1132 void RecordWriteIntoCodeSlow(Code* host, RelocInfo* rinfo, Object* target);
1133 inline void RecordFixedArrayElements(FixedArray* array, int offset, 1123 inline void RecordFixedArrayElements(FixedArray* array, int offset,
1134 int length); 1124 int length);
1135 1125
1136 Address* store_buffer_top_address() { return store_buffer()->top_address(); } 1126 Address* store_buffer_top_address() { return store_buffer()->top_address(); }
1137 1127
1138 void ClearRecordedSlot(HeapObject* object, Object** slot); 1128 void ClearRecordedSlot(HeapObject* object, Object** slot);
1139 void ClearRecordedSlotRange(Address start, Address end); 1129 void ClearRecordedSlotRange(Address start, Address end);
1140 1130
1141 // =========================================================================== 1131 // ===========================================================================
1142 // Incremental marking API. ================================================== 1132 // Incremental marking API. ==================================================
(...skipping 1554 matching lines...) Expand 10 before | Expand all | Expand 10 after
2697 friend class LargeObjectSpace; 2687 friend class LargeObjectSpace;
2698 friend class NewSpace; 2688 friend class NewSpace;
2699 friend class PagedSpace; 2689 friend class PagedSpace;
2700 DISALLOW_COPY_AND_ASSIGN(AllocationObserver); 2690 DISALLOW_COPY_AND_ASSIGN(AllocationObserver);
2701 }; 2691 };
2702 2692
2703 } // namespace internal 2693 } // namespace internal
2704 } // namespace v8 2694 } // namespace v8
2705 2695
2706 #endif // V8_HEAP_HEAP_H_ 2696 #endif // V8_HEAP_HEAP_H_
OLDNEW
« no previous file with comments | « src/compiler.cc ('k') | src/heap/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698