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

Side by Side Diff: src/heap.h

Issue 20299002: Put object templates of the i18n extension on the heap object. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 5 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)
192 194
193 #define ROOT_LIST(V) \ 195 #define ROOT_LIST(V) \
194 STRONG_ROOT_LIST(V) \ 196 STRONG_ROOT_LIST(V) \
195 V(StringTable, string_table, StringTable) 197 V(StringTable, string_table, StringTable)
196 198
197 #define INTERNALIZED_STRING_LIST(V) \ 199 #define INTERNALIZED_STRING_LIST(V) \
198 V(Array_string, "Array") \ 200 V(Array_string, "Array") \
199 V(Object_string, "Object") \ 201 V(Object_string, "Object") \
200 V(proto_string, "__proto__") \ 202 V(proto_string, "__proto__") \
201 V(StringImpl_string, "StringImpl") \ 203 V(StringImpl_string, "StringImpl") \
(...skipping 1089 matching lines...) Expand 10 before | Expand all | Expand 10 after
1291 void RemoveGCEpilogueCallback(GCEpilogueCallback callback); 1293 void RemoveGCEpilogueCallback(GCEpilogueCallback callback);
1292 1294
1293 void SetGlobalGCPrologueCallback(GCCallback callback) { 1295 void SetGlobalGCPrologueCallback(GCCallback callback) {
1294 ASSERT((callback == NULL) ^ (global_gc_prologue_callback_ == NULL)); 1296 ASSERT((callback == NULL) ^ (global_gc_prologue_callback_ == NULL));
1295 global_gc_prologue_callback_ = callback; 1297 global_gc_prologue_callback_ = callback;
1296 } 1298 }
1297 void SetGlobalGCEpilogueCallback(GCCallback callback) { 1299 void SetGlobalGCEpilogueCallback(GCCallback callback) {
1298 ASSERT((callback == NULL) ^ (global_gc_epilogue_callback_ == NULL)); 1300 ASSERT((callback == NULL) ^ (global_gc_epilogue_callback_ == NULL));
1299 global_gc_epilogue_callback_ = callback; 1301 global_gc_epilogue_callback_ = callback;
1300 } 1302 }
1303 void SetI18nTemplateOne(ObjectTemplateInfo* tmpl) {
1304 set_i18n_template_one(tmpl);
1305 }
1306 void SetI18nTemplateTwo(ObjectTemplateInfo* tmpl) {
1307 set_i18n_template_two(tmpl);
1308 }
1301 1309
1302 // Heap root getters. We have versions with and without type::cast() here. 1310 // Heap root getters. We have versions with and without type::cast() here.
1303 // You can't use type::cast during GC because the assert fails. 1311 // You can't use type::cast during GC because the assert fails.
1304 // TODO(1490): Try removing the unchecked accessors, now that GC marking does 1312 // TODO(1490): Try removing the unchecked accessors, now that GC marking does
1305 // not corrupt the map. 1313 // not corrupt the map.
1306 #define ROOT_ACCESSOR(type, name, camel_name) \ 1314 #define ROOT_ACCESSOR(type, name, camel_name) \
1307 type* name() { \ 1315 type* name() { \
1308 return type::cast(roots_[k##camel_name##RootIndex]); \ 1316 return type::cast(roots_[k##camel_name##RootIndex]); \
1309 } \ 1317 } \
1310 type* raw_unchecked_##name() { \ 1318 type* raw_unchecked_##name() { \
(...skipping 1731 matching lines...) Expand 10 before | Expand all | Expand 10 after
3042 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. 3050 DisallowHeapAllocation no_allocation; // i.e. no gc allowed.
3043 3051
3044 private: 3052 private:
3045 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); 3053 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer);
3046 }; 3054 };
3047 #endif // DEBUG 3055 #endif // DEBUG
3048 3056
3049 } } // namespace v8::internal 3057 } } // namespace v8::internal
3050 3058
3051 #endif // V8_HEAP_H_ 3059 #endif // V8_HEAP_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698