Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(183)

Side by Side Diff: src/heap.h

Issue 21133006: introduce eternal handles (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: added new space iterability Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 V(NameDictionary, intrinsic_function_names, IntrinsicFunctionNames) \ 181 V(NameDictionary, intrinsic_function_names, IntrinsicFunctionNames) \
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(SeededNumberDictionary, empty_slow_element_dictionary, \ 189 V(SeededNumberDictionary, empty_slow_element_dictionary, \
190 EmptySlowElementDictionary) \ 190 EmptySlowElementDictionary) \
191 V(Symbol, observed_symbol, ObservedSymbol) \ 191 V(Symbol, observed_symbol, ObservedSymbol)
192 V(HeapObject, i18n_template_one, I18nTemplateOne) \
193 V(HeapObject, i18n_template_two, I18nTemplateTwo)
194 192
195 #define ROOT_LIST(V) \ 193 #define ROOT_LIST(V) \
196 STRONG_ROOT_LIST(V) \ 194 STRONG_ROOT_LIST(V) \
197 V(StringTable, string_table, StringTable) 195 V(StringTable, string_table, StringTable)
198 196
199 #define INTERNALIZED_STRING_LIST(V) \ 197 #define INTERNALIZED_STRING_LIST(V) \
200 V(Array_string, "Array") \ 198 V(Array_string, "Array") \
201 V(Object_string, "Object") \ 199 V(Object_string, "Object") \
202 V(proto_string, "__proto__") \ 200 V(proto_string, "__proto__") \
203 V(StringImpl_string, "StringImpl") \ 201 V(StringImpl_string, "StringImpl") \
(...skipping 1089 matching lines...) Expand 10 before | Expand all | Expand 10 after
1293 void RemoveGCEpilogueCallback(GCEpilogueCallback callback); 1291 void RemoveGCEpilogueCallback(GCEpilogueCallback callback);
1294 1292
1295 void SetGlobalGCPrologueCallback(GCCallback callback) { 1293 void SetGlobalGCPrologueCallback(GCCallback callback) {
1296 ASSERT((callback == NULL) ^ (global_gc_prologue_callback_ == NULL)); 1294 ASSERT((callback == NULL) ^ (global_gc_prologue_callback_ == NULL));
1297 global_gc_prologue_callback_ = callback; 1295 global_gc_prologue_callback_ = callback;
1298 } 1296 }
1299 void SetGlobalGCEpilogueCallback(GCCallback callback) { 1297 void SetGlobalGCEpilogueCallback(GCCallback callback) {
1300 ASSERT((callback == NULL) ^ (global_gc_epilogue_callback_ == NULL)); 1298 ASSERT((callback == NULL) ^ (global_gc_epilogue_callback_ == NULL));
1301 global_gc_epilogue_callback_ = callback; 1299 global_gc_epilogue_callback_ = callback;
1302 } 1300 }
1303 void SetI18nTemplateOne(ObjectTemplateInfo* tmpl) {
1304 set_i18n_template_one(tmpl);
1305 }
1306 void SetI18nTemplateTwo(ObjectTemplateInfo* tmpl) {
1307 set_i18n_template_two(tmpl);
1308 }
1309 1301
1310 // Heap root getters. We have versions with and without type::cast() here. 1302 // Heap root getters. We have versions with and without type::cast() here.
1311 // You can't use type::cast during GC because the assert fails. 1303 // You can't use type::cast during GC because the assert fails.
1312 // TODO(1490): Try removing the unchecked accessors, now that GC marking does 1304 // TODO(1490): Try removing the unchecked accessors, now that GC marking does
1313 // not corrupt the map. 1305 // not corrupt the map.
1314 #define ROOT_ACCESSOR(type, name, camel_name) \ 1306 #define ROOT_ACCESSOR(type, name, camel_name) \
1315 type* name() { \ 1307 type* name() { \
1316 return type::cast(roots_[k##camel_name##RootIndex]); \ 1308 return type::cast(roots_[k##camel_name##RootIndex]); \
1317 } \ 1309 } \
1318 type* raw_unchecked_##name() { \ 1310 type* raw_unchecked_##name() { \
(...skipping 1731 matching lines...) Expand 10 before | Expand all | Expand 10 after
3050 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. 3042 DisallowHeapAllocation no_allocation; // i.e. no gc allowed.
3051 3043
3052 private: 3044 private:
3053 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); 3045 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer);
3054 }; 3046 };
3055 #endif // DEBUG 3047 #endif // DEBUG
3056 3048
3057 } } // namespace v8::internal 3049 } } // namespace v8::internal
3058 3050
3059 #endif // V8_HEAP_H_ 3051 #endif // V8_HEAP_H_
OLDNEW
« src/global-handles.cc ('K') | « src/global-handles.cc ('k') | src/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698