OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 V(Smi, arguments_adaptor_deopt_pc_offset, ArgumentsAdaptorDeoptPCOffset) \ | 182 V(Smi, arguments_adaptor_deopt_pc_offset, ArgumentsAdaptorDeoptPCOffset) \ |
183 V(Smi, construct_stub_deopt_pc_offset, ConstructStubDeoptPCOffset) \ | 183 V(Smi, construct_stub_deopt_pc_offset, ConstructStubDeoptPCOffset) \ |
184 V(Smi, getter_stub_deopt_pc_offset, GetterStubDeoptPCOffset) \ | 184 V(Smi, getter_stub_deopt_pc_offset, GetterStubDeoptPCOffset) \ |
185 V(Smi, setter_stub_deopt_pc_offset, SetterStubDeoptPCOffset) \ | 185 V(Smi, setter_stub_deopt_pc_offset, SetterStubDeoptPCOffset) \ |
186 V(JSObject, observation_state, ObservationState) \ | 186 V(JSObject, observation_state, ObservationState) \ |
187 V(Map, external_map, ExternalMap) \ | 187 V(Map, external_map, ExternalMap) \ |
188 V(Symbol, frozen_symbol, FrozenSymbol) \ | 188 V(Symbol, frozen_symbol, FrozenSymbol) \ |
189 V(Symbol, elements_transition_symbol, ElementsTransitionSymbol) \ | 189 V(Symbol, elements_transition_symbol, ElementsTransitionSymbol) \ |
190 V(SeededNumberDictionary, empty_slow_element_dictionary, \ | 190 V(SeededNumberDictionary, empty_slow_element_dictionary, \ |
191 EmptySlowElementDictionary) \ | 191 EmptySlowElementDictionary) \ |
192 V(Symbol, observed_symbol, ObservedSymbol) \ | 192 V(Symbol, observed_symbol, ObservedSymbol) |
193 V(HeapObject, i18n_template_one, I18nTemplateOne) \ | |
194 V(HeapObject, i18n_template_two, I18nTemplateTwo) | |
195 | 193 |
196 #define ROOT_LIST(V) \ | 194 #define ROOT_LIST(V) \ |
197 STRONG_ROOT_LIST(V) \ | 195 STRONG_ROOT_LIST(V) \ |
198 V(StringTable, string_table, StringTable) | 196 V(StringTable, string_table, StringTable) |
199 | 197 |
200 #define INTERNALIZED_STRING_LIST(V) \ | 198 #define INTERNALIZED_STRING_LIST(V) \ |
201 V(Array_string, "Array") \ | 199 V(Array_string, "Array") \ |
202 V(Object_string, "Object") \ | 200 V(Object_string, "Object") \ |
203 V(proto_string, "__proto__") \ | 201 V(proto_string, "__proto__") \ |
204 V(StringImpl_string, "StringImpl") \ | 202 V(StringImpl_string, "StringImpl") \ |
(...skipping 1090 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1295 void RemoveGCEpilogueCallback(GCEpilogueCallback callback); | 1293 void RemoveGCEpilogueCallback(GCEpilogueCallback callback); |
1296 | 1294 |
1297 void SetGlobalGCPrologueCallback(GCCallback callback) { | 1295 void SetGlobalGCPrologueCallback(GCCallback callback) { |
1298 ASSERT((callback == NULL) ^ (global_gc_prologue_callback_ == NULL)); | 1296 ASSERT((callback == NULL) ^ (global_gc_prologue_callback_ == NULL)); |
1299 global_gc_prologue_callback_ = callback; | 1297 global_gc_prologue_callback_ = callback; |
1300 } | 1298 } |
1301 void SetGlobalGCEpilogueCallback(GCCallback callback) { | 1299 void SetGlobalGCEpilogueCallback(GCCallback callback) { |
1302 ASSERT((callback == NULL) ^ (global_gc_epilogue_callback_ == NULL)); | 1300 ASSERT((callback == NULL) ^ (global_gc_epilogue_callback_ == NULL)); |
1303 global_gc_epilogue_callback_ = callback; | 1301 global_gc_epilogue_callback_ = callback; |
1304 } | 1302 } |
1305 void SetI18nTemplateOne(ObjectTemplateInfo* tmpl) { | |
1306 set_i18n_template_one(tmpl); | |
1307 } | |
1308 void SetI18nTemplateTwo(ObjectTemplateInfo* tmpl) { | |
1309 set_i18n_template_two(tmpl); | |
1310 } | |
1311 | 1303 |
1312 // Heap root getters. We have versions with and without type::cast() here. | 1304 // Heap root getters. We have versions with and without type::cast() here. |
1313 // You can't use type::cast during GC because the assert fails. | 1305 // You can't use type::cast during GC because the assert fails. |
1314 // TODO(1490): Try removing the unchecked accessors, now that GC marking does | 1306 // TODO(1490): Try removing the unchecked accessors, now that GC marking does |
1315 // not corrupt the map. | 1307 // not corrupt the map. |
1316 #define ROOT_ACCESSOR(type, name, camel_name) \ | 1308 #define ROOT_ACCESSOR(type, name, camel_name) \ |
1317 type* name() { \ | 1309 type* name() { \ |
1318 return type::cast(roots_[k##camel_name##RootIndex]); \ | 1310 return type::cast(roots_[k##camel_name##RootIndex]); \ |
1319 } \ | 1311 } \ |
1320 type* raw_unchecked_##name() { \ | 1312 type* raw_unchecked_##name() { \ |
(...skipping 1728 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3049 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. | 3041 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. |
3050 | 3042 |
3051 private: | 3043 private: |
3052 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); | 3044 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); |
3053 }; | 3045 }; |
3054 #endif // DEBUG | 3046 #endif // DEBUG |
3055 | 3047 |
3056 } } // namespace v8::internal | 3048 } } // namespace v8::internal |
3057 | 3049 |
3058 #endif // V8_HEAP_H_ | 3050 #endif // V8_HEAP_H_ |
OLD | NEW |