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 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 V(Cell, is_concat_spreadable_protector, IsConcatSpreadableProtector) \ | 193 V(Cell, is_concat_spreadable_protector, IsConcatSpreadableProtector) \ |
194 V(PropertyCell, empty_property_cell, EmptyPropertyCell) \ | 194 V(PropertyCell, empty_property_cell, EmptyPropertyCell) \ |
195 V(Object, weak_stack_trace_list, WeakStackTraceList) \ | 195 V(Object, weak_stack_trace_list, WeakStackTraceList) \ |
196 V(Object, noscript_shared_function_infos, NoScriptSharedFunctionInfos) \ | 196 V(Object, noscript_shared_function_infos, NoScriptSharedFunctionInfos) \ |
197 V(Map, bytecode_array_map, BytecodeArrayMap) \ | 197 V(Map, bytecode_array_map, BytecodeArrayMap) \ |
198 V(WeakCell, empty_weak_cell, EmptyWeakCell) \ | 198 V(WeakCell, empty_weak_cell, EmptyWeakCell) \ |
199 V(PropertyCell, has_instance_protector, HasInstanceProtector) \ | 199 V(PropertyCell, has_instance_protector, HasInstanceProtector) \ |
200 V(Cell, species_protector, SpeciesProtector) | 200 V(Cell, species_protector, SpeciesProtector) |
201 | 201 |
202 // Entries in this list are limited to Smis and are not visited during GC. | 202 // Entries in this list are limited to Smis and are not visited during GC. |
203 #define SMI_ROOT_LIST(V) \ | 203 #define SMI_ROOT_LIST(V) \ |
204 V(Smi, stack_limit, StackLimit) \ | 204 V(Smi, stack_limit, StackLimit) \ |
205 V(Smi, real_stack_limit, RealStackLimit) \ | 205 V(Smi, real_stack_limit, RealStackLimit) \ |
206 V(Smi, last_script_id, LastScriptId) \ | 206 V(Smi, last_script_id, LastScriptId) \ |
207 V(Smi, arguments_adaptor_deopt_pc_offset, ArgumentsAdaptorDeoptPCOffset) \ | 207 /* To distinguish the function templates, so that we can find them in the */ \ |
208 V(Smi, construct_stub_deopt_pc_offset, ConstructStubDeoptPCOffset) \ | 208 /* function cache of the native context. */ \ |
209 V(Smi, getter_stub_deopt_pc_offset, GetterStubDeoptPCOffset) \ | 209 V(Smi, next_template_serial_number, NextTemplateSerialNumber) \ |
210 V(Smi, setter_stub_deopt_pc_offset, SetterStubDeoptPCOffset) \ | 210 V(Smi, arguments_adaptor_deopt_pc_offset, ArgumentsAdaptorDeoptPCOffset) \ |
| 211 V(Smi, construct_stub_deopt_pc_offset, ConstructStubDeoptPCOffset) \ |
| 212 V(Smi, getter_stub_deopt_pc_offset, GetterStubDeoptPCOffset) \ |
| 213 V(Smi, setter_stub_deopt_pc_offset, SetterStubDeoptPCOffset) \ |
211 V(Smi, interpreter_entry_return_pc_offset, InterpreterEntryReturnPCOffset) | 214 V(Smi, interpreter_entry_return_pc_offset, InterpreterEntryReturnPCOffset) |
212 | 215 |
213 #define ROOT_LIST(V) \ | 216 #define ROOT_LIST(V) \ |
214 STRONG_ROOT_LIST(V) \ | 217 STRONG_ROOT_LIST(V) \ |
215 SMI_ROOT_LIST(V) \ | 218 SMI_ROOT_LIST(V) \ |
216 V(StringTable, string_table, StringTable) | 219 V(StringTable, string_table, StringTable) |
217 | 220 |
218 | 221 |
219 // Heap roots that are known to be immortal immovable, for which we can safely | 222 // Heap roots that are known to be immortal immovable, for which we can safely |
220 // skip write barriers. This list is not complete and has omissions. | 223 // skip write barriers. This list is not complete and has omissions. |
(...skipping 574 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
795 | 798 |
796 inline uint32_t HashSeed(); | 799 inline uint32_t HashSeed(); |
797 | 800 |
798 inline int NextScriptId(); | 801 inline int NextScriptId(); |
799 | 802 |
800 inline void SetArgumentsAdaptorDeoptPCOffset(int pc_offset); | 803 inline void SetArgumentsAdaptorDeoptPCOffset(int pc_offset); |
801 inline void SetConstructStubDeoptPCOffset(int pc_offset); | 804 inline void SetConstructStubDeoptPCOffset(int pc_offset); |
802 inline void SetGetterStubDeoptPCOffset(int pc_offset); | 805 inline void SetGetterStubDeoptPCOffset(int pc_offset); |
803 inline void SetSetterStubDeoptPCOffset(int pc_offset); | 806 inline void SetSetterStubDeoptPCOffset(int pc_offset); |
804 inline void SetInterpreterEntryReturnPCOffset(int pc_offset); | 807 inline void SetInterpreterEntryReturnPCOffset(int pc_offset); |
| 808 inline int GetNextTemplateSerialNumber(); |
805 | 809 |
806 // For post mortem debugging. | 810 // For post mortem debugging. |
807 void RememberUnmappedPage(Address page, bool compacted); | 811 void RememberUnmappedPage(Address page, bool compacted); |
808 | 812 |
809 // Global inline caching age: it is incremented on some GCs after context | 813 // Global inline caching age: it is incremented on some GCs after context |
810 // disposal. We use it to flush inline caches. | 814 // disposal. We use it to flush inline caches. |
811 int global_ic_age() { return global_ic_age_; } | 815 int global_ic_age() { return global_ic_age_; } |
812 | 816 |
813 void AgeInlineCaches() { | 817 void AgeInlineCaches() { |
814 global_ic_age_ = (global_ic_age_ + 1) & SharedFunctionInfo::ICAgeBits::kMax; | 818 global_ic_age_ = (global_ic_age_ + 1) & SharedFunctionInfo::ICAgeBits::kMax; |
(...skipping 1855 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2670 friend class LargeObjectSpace; | 2674 friend class LargeObjectSpace; |
2671 friend class NewSpace; | 2675 friend class NewSpace; |
2672 friend class PagedSpace; | 2676 friend class PagedSpace; |
2673 DISALLOW_COPY_AND_ASSIGN(AllocationObserver); | 2677 DISALLOW_COPY_AND_ASSIGN(AllocationObserver); |
2674 }; | 2678 }; |
2675 | 2679 |
2676 } // namespace internal | 2680 } // namespace internal |
2677 } // namespace v8 | 2681 } // namespace v8 |
2678 | 2682 |
2679 #endif // V8_HEAP_HEAP_H_ | 2683 #endif // V8_HEAP_HEAP_H_ |
OLD | NEW |