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(WeakHashTable, weak_object_to_code_table, WeakObjectToCodeTable) \ | 197 V(WeakHashTable, weak_object_to_code_table, WeakObjectToCodeTable) \ |
198 /* weak_new_space_object_to_code_list is an array of weak cells, where */ \ | 198 /* weak_new_space_object_to_code_list is an array of weak cells, where */ \ |
199 /* slots with even indices refer to the weak object, and the subsequent */ \ | 199 /* slots with even indices refer to the weak object, and the subsequent */ \ |
200 /* slots refer to the code with the reference to the weak object. */ \ | 200 /* slots refer to the code with the reference to the weak object. */ \ |
201 V(ArrayList, weak_new_space_object_to_code_list, \ | 201 V(ArrayList, weak_new_space_object_to_code_list, \ |
202 WeakNewSpaceObjectToCodeList) \ | 202 WeakNewSpaceObjectToCodeList) \ |
203 V(Object, weak_stack_trace_list, WeakStackTraceList) \ | 203 V(Object, weak_stack_trace_list, WeakStackTraceList) \ |
204 V(Object, noscript_shared_function_infos, NoScriptSharedFunctionInfos) \ | 204 V(Object, noscript_shared_function_infos, NoScriptSharedFunctionInfos) \ |
205 V(FixedArray, serialized_templates, SerializedTemplates) \ | 205 V(FixedArray, serialized_templates, SerializedTemplates) \ |
206 /* Configured values */ \ | 206 /* Configured values */ \ |
207 V(JSObject, message_listeners, MessageListeners) \ | 207 V(TemplateList, message_listeners, MessageListeners) \ |
208 V(Code, js_entry_code, JsEntryCode) \ | 208 V(Code, js_entry_code, JsEntryCode) \ |
209 V(Code, js_construct_entry_code, JsConstructEntryCode) \ | 209 V(Code, js_construct_entry_code, JsConstructEntryCode) \ |
210 /* Oddball maps */ \ | 210 /* Oddball maps */ \ |
211 V(Map, undefined_map, UndefinedMap) \ | 211 V(Map, undefined_map, UndefinedMap) \ |
212 V(Map, the_hole_map, TheHoleMap) \ | 212 V(Map, the_hole_map, TheHoleMap) \ |
213 V(Map, null_map, NullMap) \ | 213 V(Map, null_map, NullMap) \ |
214 V(Map, boolean_map, BooleanMap) \ | 214 V(Map, boolean_map, BooleanMap) \ |
215 V(Map, uninitialized_map, UninitializedMap) \ | 215 V(Map, uninitialized_map, UninitializedMap) \ |
216 V(Map, arguments_marker_map, ArgumentsMarkerMap) \ | 216 V(Map, arguments_marker_map, ArgumentsMarkerMap) \ |
217 V(Map, no_interceptor_result_sentinel_map, NoInterceptorResultSentinelMap) \ | 217 V(Map, no_interceptor_result_sentinel_map, NoInterceptorResultSentinelMap) \ |
(...skipping 809 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1027 } | 1027 } |
1028 | 1028 |
1029 void SetRootStringTable(StringTable* value) { | 1029 void SetRootStringTable(StringTable* value) { |
1030 roots_[kStringTableRootIndex] = value; | 1030 roots_[kStringTableRootIndex] = value; |
1031 } | 1031 } |
1032 | 1032 |
1033 void SetRootNoScriptSharedFunctionInfos(Object* value) { | 1033 void SetRootNoScriptSharedFunctionInfos(Object* value) { |
1034 roots_[kNoScriptSharedFunctionInfosRootIndex] = value; | 1034 roots_[kNoScriptSharedFunctionInfosRootIndex] = value; |
1035 } | 1035 } |
1036 | 1036 |
| 1037 void SetMessageListeners(TemplateList* value) { |
| 1038 roots_[kMessageListenersRootIndex] = value; |
| 1039 } |
| 1040 |
1037 // Set the stack limit in the roots_ array. Some architectures generate | 1041 // Set the stack limit in the roots_ array. Some architectures generate |
1038 // code that looks here, because it is faster than loading from the static | 1042 // code that looks here, because it is faster than loading from the static |
1039 // jslimit_/real_jslimit_ variable in the StackGuard. | 1043 // jslimit_/real_jslimit_ variable in the StackGuard. |
1040 void SetStackLimits(); | 1044 void SetStackLimits(); |
1041 | 1045 |
1042 // The stack limit is thread-dependent. To be able to reproduce the same | 1046 // The stack limit is thread-dependent. To be able to reproduce the same |
1043 // snapshot blob, we need to reset it before serializing. | 1047 // snapshot blob, we need to reset it before serializing. |
1044 void ClearStackLimits(); | 1048 void ClearStackLimits(); |
1045 | 1049 |
1046 // Generated code can treat direct references to this root as constant. | 1050 // Generated code can treat direct references to this root as constant. |
(...skipping 1646 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2693 friend class LargeObjectSpace; | 2697 friend class LargeObjectSpace; |
2694 friend class NewSpace; | 2698 friend class NewSpace; |
2695 friend class PagedSpace; | 2699 friend class PagedSpace; |
2696 DISALLOW_COPY_AND_ASSIGN(AllocationObserver); | 2700 DISALLOW_COPY_AND_ASSIGN(AllocationObserver); |
2697 }; | 2701 }; |
2698 | 2702 |
2699 } // namespace internal | 2703 } // namespace internal |
2700 } // namespace v8 | 2704 } // namespace v8 |
2701 | 2705 |
2702 #endif // V8_HEAP_HEAP_H_ | 2706 #endif // V8_HEAP_HEAP_H_ |
OLD | NEW |