Chromium Code Reviews| 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_code_to_new_space_ref_list is an arraylist 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_code_to_new_space_ref_list, WeakCodeToNewSpaceRefList) \ | |
|
ulan
2016/06/08 14:37:00
Lets name it weak_new_space_object_to_code_list.
ahaas
2016/06/09 10:34:32
Done.
| |
| 192 V(PropertyCell, array_protector, ArrayProtector) \ | 196 V(PropertyCell, array_protector, ArrayProtector) \ |
| 193 V(Cell, is_concat_spreadable_protector, IsConcatSpreadableProtector) \ | 197 V(Cell, is_concat_spreadable_protector, IsConcatSpreadableProtector) \ |
| 194 V(PropertyCell, empty_property_cell, EmptyPropertyCell) \ | 198 V(PropertyCell, empty_property_cell, EmptyPropertyCell) \ |
| 195 V(Object, weak_stack_trace_list, WeakStackTraceList) \ | 199 V(Object, weak_stack_trace_list, WeakStackTraceList) \ |
| 196 V(Object, noscript_shared_function_infos, NoScriptSharedFunctionInfos) \ | 200 V(Object, noscript_shared_function_infos, NoScriptSharedFunctionInfos) \ |
| 197 V(Map, bytecode_array_map, BytecodeArrayMap) \ | 201 V(Map, bytecode_array_map, BytecodeArrayMap) \ |
| 198 V(WeakCell, empty_weak_cell, EmptyWeakCell) \ | 202 V(WeakCell, empty_weak_cell, EmptyWeakCell) \ |
| 199 V(PropertyCell, has_instance_protector, HasInstanceProtector) \ | 203 V(PropertyCell, has_instance_protector, HasInstanceProtector) \ |
| 200 V(Cell, species_protector, SpeciesProtector) | 204 V(Cell, species_protector, SpeciesProtector) |
| 201 | 205 |
| (...skipping 629 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 831 amount_of_external_allocated_memory_freed_.Value(); | 835 amount_of_external_allocated_memory_freed_.Value(); |
| 832 amount_of_external_allocated_memory_freed_.SetValue(0); | 836 amount_of_external_allocated_memory_freed_.SetValue(0); |
| 833 } | 837 } |
| 834 | 838 |
| 835 void DeoptMarkedAllocationSites(); | 839 void DeoptMarkedAllocationSites(); |
| 836 | 840 |
| 837 bool DeoptMaybeTenuredAllocationSites() { | 841 bool DeoptMaybeTenuredAllocationSites() { |
| 838 return new_space_.IsAtMaximumCapacity() && maximum_size_scavenges_ == 0; | 842 return new_space_.IsAtMaximumCapacity() && maximum_size_scavenges_ == 0; |
| 839 } | 843 } |
| 840 | 844 |
| 845 void RecordWeakCodeToNewSpaceReference(Handle<HeapObject> obj, | |
| 846 Handle<WeakCell> code); | |
| 847 | |
| 841 void AddWeakObjectToCodeDependency(Handle<HeapObject> obj, | 848 void AddWeakObjectToCodeDependency(Handle<HeapObject> obj, |
| 842 Handle<DependentCode> dep); | 849 Handle<DependentCode> dep); |
| 843 | 850 |
| 844 DependentCode* LookupWeakObjectToCodeDependency(Handle<HeapObject> obj); | 851 DependentCode* LookupWeakObjectToCodeDependency(Handle<HeapObject> obj); |
| 845 | 852 |
| 846 void AddRetainedMap(Handle<Map> map); | 853 void AddRetainedMap(Handle<Map> map); |
| 847 | 854 |
| 848 // This event is triggered after successful allocation of a new object made | 855 // This event is triggered after successful allocation of a new object made |
| 849 // by runtime. Allocations of target space for object evacuation do not | 856 // by runtime. Allocations of target space for object evacuation do not |
| 850 // trigger the event. In order to track ALL allocations one must turn off | 857 // trigger the event. In order to track ALL allocations one must turn off |
| (...skipping 1817 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2668 friend class LargeObjectSpace; | 2675 friend class LargeObjectSpace; |
| 2669 friend class NewSpace; | 2676 friend class NewSpace; |
| 2670 friend class PagedSpace; | 2677 friend class PagedSpace; |
| 2671 DISALLOW_COPY_AND_ASSIGN(AllocationObserver); | 2678 DISALLOW_COPY_AND_ASSIGN(AllocationObserver); |
| 2672 }; | 2679 }; |
| 2673 | 2680 |
| 2674 } // namespace internal | 2681 } // namespace internal |
| 2675 } // namespace v8 | 2682 } // namespace v8 |
| 2676 | 2683 |
| 2677 #endif // V8_HEAP_HEAP_H_ | 2684 #endif // V8_HEAP_HEAP_H_ |
| OLD | NEW |