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 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 V(Cell, species_protector, SpeciesProtector) | 197 V(Cell, species_protector, SpeciesProtector) |
198 | 198 |
199 // Entries in this list are limited to Smis and are not visited during GC. | 199 // Entries in this list are limited to Smis and are not visited during GC. |
200 #define SMI_ROOT_LIST(V) \ | 200 #define SMI_ROOT_LIST(V) \ |
201 V(Smi, stack_limit, StackLimit) \ | 201 V(Smi, stack_limit, StackLimit) \ |
202 V(Smi, real_stack_limit, RealStackLimit) \ | 202 V(Smi, real_stack_limit, RealStackLimit) \ |
203 V(Smi, last_script_id, LastScriptId) \ | 203 V(Smi, last_script_id, LastScriptId) \ |
204 V(Smi, arguments_adaptor_deopt_pc_offset, ArgumentsAdaptorDeoptPCOffset) \ | 204 V(Smi, arguments_adaptor_deopt_pc_offset, ArgumentsAdaptorDeoptPCOffset) \ |
205 V(Smi, construct_stub_deopt_pc_offset, ConstructStubDeoptPCOffset) \ | 205 V(Smi, construct_stub_deopt_pc_offset, ConstructStubDeoptPCOffset) \ |
206 V(Smi, getter_stub_deopt_pc_offset, GetterStubDeoptPCOffset) \ | 206 V(Smi, getter_stub_deopt_pc_offset, GetterStubDeoptPCOffset) \ |
207 V(Smi, setter_stub_deopt_pc_offset, SetterStubDeoptPCOffset) | 207 V(Smi, setter_stub_deopt_pc_offset, SetterStubDeoptPCOffset) \ |
208 | 208 V(Smi, interpreter_entry_return_pc_offset, InterpreterEntryReturnPCOffset) |
209 | 209 |
210 #define ROOT_LIST(V) \ | 210 #define ROOT_LIST(V) \ |
211 STRONG_ROOT_LIST(V) \ | 211 STRONG_ROOT_LIST(V) \ |
212 SMI_ROOT_LIST(V) \ | 212 SMI_ROOT_LIST(V) \ |
213 V(StringTable, string_table, StringTable) | 213 V(StringTable, string_table, StringTable) |
214 | 214 |
215 | 215 |
216 // Heap roots that are known to be immortal immovable, for which we can safely | 216 // Heap roots that are known to be immortal immovable, for which we can safely |
217 // skip write barriers. This list is not complete and has omissions. | 217 // skip write barriers. This list is not complete and has omissions. |
218 #define IMMORTAL_IMMOVABLE_ROOT_LIST(V) \ | 218 #define IMMORTAL_IMMOVABLE_ROOT_LIST(V) \ |
(...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
786 inline void CompletelyClearInstanceofCache(); | 786 inline void CompletelyClearInstanceofCache(); |
787 | 787 |
788 inline uint32_t HashSeed(); | 788 inline uint32_t HashSeed(); |
789 | 789 |
790 inline int NextScriptId(); | 790 inline int NextScriptId(); |
791 | 791 |
792 inline void SetArgumentsAdaptorDeoptPCOffset(int pc_offset); | 792 inline void SetArgumentsAdaptorDeoptPCOffset(int pc_offset); |
793 inline void SetConstructStubDeoptPCOffset(int pc_offset); | 793 inline void SetConstructStubDeoptPCOffset(int pc_offset); |
794 inline void SetGetterStubDeoptPCOffset(int pc_offset); | 794 inline void SetGetterStubDeoptPCOffset(int pc_offset); |
795 inline void SetSetterStubDeoptPCOffset(int pc_offset); | 795 inline void SetSetterStubDeoptPCOffset(int pc_offset); |
| 796 inline void SetInterpreterEntryReturnPCOffset(int pc_offset); |
796 | 797 |
797 // For post mortem debugging. | 798 // For post mortem debugging. |
798 void RememberUnmappedPage(Address page, bool compacted); | 799 void RememberUnmappedPage(Address page, bool compacted); |
799 | 800 |
800 // Global inline caching age: it is incremented on some GCs after context | 801 // Global inline caching age: it is incremented on some GCs after context |
801 // disposal. We use it to flush inline caches. | 802 // disposal. We use it to flush inline caches. |
802 int global_ic_age() { return global_ic_age_; } | 803 int global_ic_age() { return global_ic_age_; } |
803 | 804 |
804 void AgeInlineCaches() { | 805 void AgeInlineCaches() { |
805 global_ic_age_ = (global_ic_age_ + 1) & SharedFunctionInfo::ICAgeBits::kMax; | 806 global_ic_age_ = (global_ic_age_ + 1) & SharedFunctionInfo::ICAgeBits::kMax; |
(...skipping 1839 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2645 friend class LargeObjectSpace; | 2646 friend class LargeObjectSpace; |
2646 friend class NewSpace; | 2647 friend class NewSpace; |
2647 friend class PagedSpace; | 2648 friend class PagedSpace; |
2648 DISALLOW_COPY_AND_ASSIGN(AllocationObserver); | 2649 DISALLOW_COPY_AND_ASSIGN(AllocationObserver); |
2649 }; | 2650 }; |
2650 | 2651 |
2651 } // namespace internal | 2652 } // namespace internal |
2652 } // namespace v8 | 2653 } // namespace v8 |
2653 | 2654 |
2654 #endif // V8_HEAP_HEAP_H_ | 2655 #endif // V8_HEAP_HEAP_H_ |
OLD | NEW |