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

Side by Side Diff: src/heap/heap.h

Issue 618123005: Revert "Use symbols instead of hidden properties for i18n markers." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 2 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
« no previous file with comments | « src/heap-snapshot-generator.cc ('k') | src/heap/heap.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 9
10 #include "src/allocation.h" 10 #include "src/allocation.h"
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 V(PolymorphicCodeCache, polymorphic_code_cache, PolymorphicCodeCache) \ 168 V(PolymorphicCodeCache, polymorphic_code_cache, PolymorphicCodeCache) \
169 V(Code, js_entry_code, JsEntryCode) \ 169 V(Code, js_entry_code, JsEntryCode) \
170 V(Code, js_construct_entry_code, JsConstructEntryCode) \ 170 V(Code, js_construct_entry_code, JsConstructEntryCode) \
171 V(FixedArray, natives_source_cache, NativesSourceCache) \ 171 V(FixedArray, natives_source_cache, NativesSourceCache) \
172 V(Script, empty_script, EmptyScript) \ 172 V(Script, empty_script, EmptyScript) \
173 V(NameDictionary, intrinsic_function_names, IntrinsicFunctionNames) \ 173 V(NameDictionary, intrinsic_function_names, IntrinsicFunctionNames) \
174 V(Cell, undefined_cell, UndefineCell) \ 174 V(Cell, undefined_cell, UndefineCell) \
175 V(JSObject, observation_state, ObservationState) \ 175 V(JSObject, observation_state, ObservationState) \
176 V(Map, external_map, ExternalMap) \ 176 V(Map, external_map, ExternalMap) \
177 V(Object, symbol_registry, SymbolRegistry) \ 177 V(Object, symbol_registry, SymbolRegistry) \
178 V(Symbol, frozen_symbol, FrozenSymbol) \
179 V(Symbol, nonexistent_symbol, NonExistentSymbol) \
180 V(Symbol, elements_transition_symbol, ElementsTransitionSymbol) \
178 V(SeededNumberDictionary, empty_slow_element_dictionary, \ 181 V(SeededNumberDictionary, empty_slow_element_dictionary, \
179 EmptySlowElementDictionary) \ 182 EmptySlowElementDictionary) \
183 V(Symbol, observed_symbol, ObservedSymbol) \
184 V(Symbol, uninitialized_symbol, UninitializedSymbol) \
185 V(Symbol, megamorphic_symbol, MegamorphicSymbol) \
186 V(Symbol, premonomorphic_symbol, PremonomorphicSymbol) \
187 V(Symbol, generic_symbol, GenericSymbol) \
188 V(Symbol, stack_trace_symbol, StackTraceSymbol) \
189 V(Symbol, detailed_stack_trace_symbol, DetailedStackTraceSymbol) \
190 V(Symbol, normal_ic_symbol, NormalICSymbol) \
191 V(Symbol, home_object_symbol, HomeObjectSymbol) \
192 V(Symbol, promise_debug_marker_symbol, PromiseDebugMarkerSymbol) \
193 V(Symbol, promise_has_handler_symbol, PromiseHasHandlerSymbol) \
180 V(FixedArray, materialized_objects, MaterializedObjects) \ 194 V(FixedArray, materialized_objects, MaterializedObjects) \
181 V(FixedArray, allocation_sites_scratchpad, AllocationSitesScratchpad) \ 195 V(FixedArray, allocation_sites_scratchpad, AllocationSitesScratchpad) \
182 V(FixedArray, microtask_queue, MicrotaskQueue) 196 V(FixedArray, microtask_queue, MicrotaskQueue)
183 197
184 // Entries in this list are limited to Smis and are not visited during GC. 198 // Entries in this list are limited to Smis and are not visited during GC.
185 #define SMI_ROOT_LIST(V) \ 199 #define SMI_ROOT_LIST(V) \
186 V(Smi, stack_limit, StackLimit) \ 200 V(Smi, stack_limit, StackLimit) \
187 V(Smi, real_stack_limit, RealStackLimit) \ 201 V(Smi, real_stack_limit, RealStackLimit) \
188 V(Smi, last_script_id, LastScriptId) \ 202 V(Smi, last_script_id, LastScriptId) \
189 V(Smi, arguments_adaptor_deopt_pc_offset, ArgumentsAdaptorDeoptPCOffset) \ 203 V(Smi, arguments_adaptor_deopt_pc_offset, ArgumentsAdaptorDeoptPCOffset) \
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 V(global_context_map) \ 254 V(global_context_map) \
241 V(undefined_map) \ 255 V(undefined_map) \
242 V(the_hole_map) \ 256 V(the_hole_map) \
243 V(null_map) \ 257 V(null_map) \
244 V(boolean_map) \ 258 V(boolean_map) \
245 V(uninitialized_map) \ 259 V(uninitialized_map) \
246 V(message_object_map) \ 260 V(message_object_map) \
247 V(foreign_map) \ 261 V(foreign_map) \
248 V(neander_map) 262 V(neander_map)
249 263
250 #define INTERNALIZED_STRING_LIST(V) \ 264 #define INTERNALIZED_STRING_LIST(V) \
251 V(Object_string, "Object") \ 265 V(Object_string, "Object") \
252 V(proto_string, "__proto__") \ 266 V(proto_string, "__proto__") \
253 V(arguments_string, "arguments") \ 267 V(arguments_string, "arguments") \
254 V(Arguments_string, "Arguments") \ 268 V(Arguments_string, "Arguments") \
255 V(caller_string, "caller") \ 269 V(caller_string, "caller") \
256 V(boolean_string, "boolean") \ 270 V(boolean_string, "boolean") \
257 V(Boolean_string, "Boolean") \ 271 V(Boolean_string, "Boolean") \
258 V(callee_string, "callee") \ 272 V(callee_string, "callee") \
259 V(constructor_string, "constructor") \ 273 V(constructor_string, "constructor") \
260 V(dot_result_string, ".result") \ 274 V(dot_result_string, ".result") \
261 V(dot_for_string, ".for.") \ 275 V(dot_for_string, ".for.") \
262 V(eval_string, "eval") \ 276 V(eval_string, "eval") \
263 V(empty_string, "") \ 277 V(empty_string, "") \
264 V(function_string, "function") \ 278 V(function_string, "function") \
265 V(Function_string, "Function") \ 279 V(Function_string, "Function") \
266 V(length_string, "length") \ 280 V(length_string, "length") \
267 V(name_string, "name") \ 281 V(name_string, "name") \
268 V(null_string, "null") \ 282 V(null_string, "null") \
269 V(number_string, "number") \ 283 V(number_string, "number") \
270 V(Number_string, "Number") \ 284 V(Number_string, "Number") \
271 V(nan_string, "NaN") \ 285 V(nan_string, "NaN") \
272 V(source_string, "source") \ 286 V(source_string, "source") \
273 V(source_url_string, "source_url") \ 287 V(source_url_string, "source_url") \
274 V(source_mapping_url_string, "source_mapping_url") \ 288 V(source_mapping_url_string, "source_mapping_url") \
275 V(global_string, "global") \ 289 V(global_string, "global") \
276 V(ignore_case_string, "ignoreCase") \ 290 V(ignore_case_string, "ignoreCase") \
277 V(multiline_string, "multiline") \ 291 V(multiline_string, "multiline") \
278 V(sticky_string, "sticky") \ 292 V(sticky_string, "sticky") \
279 V(harmony_regexps_string, "harmony_regexps") \ 293 V(harmony_regexps_string, "harmony_regexps") \
280 V(input_string, "input") \ 294 V(input_string, "input") \
281 V(index_string, "index") \ 295 V(index_string, "index") \
282 V(last_index_string, "lastIndex") \ 296 V(last_index_string, "lastIndex") \
283 V(object_string, "object") \ 297 V(object_string, "object") \
284 V(prototype_string, "prototype") \ 298 V(prototype_string, "prototype") \
285 V(string_string, "string") \ 299 V(string_string, "string") \
286 V(String_string, "String") \ 300 V(String_string, "String") \
287 V(symbol_string, "symbol") \ 301 V(symbol_string, "symbol") \
288 V(Symbol_string, "Symbol") \ 302 V(Symbol_string, "Symbol") \
289 V(Map_string, "Map") \ 303 V(Map_string, "Map") \
290 V(Set_string, "Set") \ 304 V(Set_string, "Set") \
291 V(WeakMap_string, "WeakMap") \ 305 V(WeakMap_string, "WeakMap") \
292 V(WeakSet_string, "WeakSet") \ 306 V(WeakSet_string, "WeakSet") \
293 V(for_string, "for") \ 307 V(for_string, "for") \
294 V(for_api_string, "for_api") \ 308 V(for_api_string, "for_api") \
295 V(for_intern_string, "for_intern") \ 309 V(for_intern_string, "for_intern") \
296 V(private_api_string, "private_api") \ 310 V(private_api_string, "private_api") \
297 V(private_intern_string, "private_intern") \ 311 V(private_intern_string, "private_intern") \
298 V(Date_string, "Date") \ 312 V(Date_string, "Date") \
299 V(char_at_string, "CharAt") \ 313 V(char_at_string, "CharAt") \
300 V(undefined_string, "undefined") \ 314 V(undefined_string, "undefined") \
301 V(value_of_string, "valueOf") \ 315 V(value_of_string, "valueOf") \
302 V(stack_string, "stack") \ 316 V(stack_string, "stack") \
303 V(toJSON_string, "toJSON") \ 317 V(toJSON_string, "toJSON") \
304 V(KeyedLoadMonomorphic_string, "KeyedLoadMonomorphic") \ 318 V(KeyedLoadMonomorphic_string, "KeyedLoadMonomorphic") \
305 V(KeyedStoreMonomorphic_string, "KeyedStoreMonomorphic") \ 319 V(KeyedStoreMonomorphic_string, "KeyedStoreMonomorphic") \
306 V(stack_overflow_string, "kStackOverflowBoilerplate") \ 320 V(stack_overflow_string, "kStackOverflowBoilerplate") \
307 V(illegal_access_string, "illegal access") \ 321 V(illegal_access_string, "illegal access") \
308 V(cell_value_string, "%cell_value") \ 322 V(cell_value_string, "%cell_value") \
309 V(illegal_argument_string, "illegal argument") \ 323 V(illegal_argument_string, "illegal argument") \
310 V(identity_hash_string, "v8::IdentityHash") \ 324 V(identity_hash_string, "v8::IdentityHash") \
311 V(closure_string, "(closure)") \ 325 V(closure_string, "(closure)") \
312 V(dot_string, ".") \ 326 V(dot_string, ".") \
313 V(compare_ic_string, "==") \ 327 V(compare_ic_string, "==") \
314 V(strict_compare_ic_string, "===") \ 328 V(strict_compare_ic_string, "===") \
315 V(infinity_string, "Infinity") \ 329 V(infinity_string, "Infinity") \
316 V(minus_infinity_string, "-Infinity") \ 330 V(minus_infinity_string, "-Infinity") \
317 V(query_colon_string, "(?:)") \ 331 V(query_colon_string, "(?:)") \
318 V(Generator_string, "Generator") \ 332 V(Generator_string, "Generator") \
319 V(throw_string, "throw") \ 333 V(throw_string, "throw") \
320 V(done_string, "done") \ 334 V(done_string, "done") \
321 V(value_string, "value") \ 335 V(value_string, "value") \
322 V(next_string, "next") \ 336 V(next_string, "next") \
323 V(byte_length_string, "byteLength") \ 337 V(byte_length_string, "byteLength") \
324 V(byte_offset_string, "byteOffset") 338 V(byte_offset_string, "byteOffset") \
325 339 V(intl_initialized_marker_string, "v8::intl_initialized_marker") \
326 #define PRIVATE_SYMBOL_LIST(V) \ 340 V(intl_impl_object_string, "v8::intl_object")
327 V(frozen_symbol) \
328 V(nonexistent_symbol) \
329 V(elements_transition_symbol) \
330 V(observed_symbol) \
331 V(uninitialized_symbol) \
332 V(megamorphic_symbol) \
333 V(premonomorphic_symbol) \
334 V(generic_symbol) \
335 V(stack_trace_symbol) \
336 V(detailed_stack_trace_symbol) \
337 V(normal_ic_symbol) \
338 V(home_object_symbol) \
339 V(intl_initialized_marker_symbol) \
340 V(intl_impl_object_symbol) \
341 V(promise_debug_marker_symbol) \
342 V(promise_has_handler_symbol)
343 341
344 // Forward declarations. 342 // Forward declarations.
345 class HeapStats; 343 class HeapStats;
346 class Isolate; 344 class Isolate;
347 class WeakObjectRetainer; 345 class WeakObjectRetainer;
348 346
349 347
350 typedef String* (*ExternalStringTableUpdaterCallback)(Heap* heap, 348 typedef String* (*ExternalStringTableUpdaterCallback)(Heap* heap,
351 Object** pointer); 349 Object** pointer);
352 350
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after
780 #define STRUCT_MAP_ACCESSOR(NAME, Name, name) \ 778 #define STRUCT_MAP_ACCESSOR(NAME, Name, name) \
781 Map* name##_map() { return Map::cast(roots_[k##Name##MapRootIndex]); } 779 Map* name##_map() { return Map::cast(roots_[k##Name##MapRootIndex]); }
782 STRUCT_LIST(STRUCT_MAP_ACCESSOR) 780 STRUCT_LIST(STRUCT_MAP_ACCESSOR)
783 #undef STRUCT_MAP_ACCESSOR 781 #undef STRUCT_MAP_ACCESSOR
784 782
785 #define STRING_ACCESSOR(name, str) \ 783 #define STRING_ACCESSOR(name, str) \
786 String* name() { return String::cast(roots_[k##name##RootIndex]); } 784 String* name() { return String::cast(roots_[k##name##RootIndex]); }
787 INTERNALIZED_STRING_LIST(STRING_ACCESSOR) 785 INTERNALIZED_STRING_LIST(STRING_ACCESSOR)
788 #undef STRING_ACCESSOR 786 #undef STRING_ACCESSOR
789 787
790 #define SYMBOL_ACCESSOR(name) \
791 Symbol* name() { return Symbol::cast(roots_[k##name##RootIndex]); }
792 PRIVATE_SYMBOL_LIST(SYMBOL_ACCESSOR)
793 #undef SYMBOL_ACCESSOR
794
795 // The hidden_string is special because it is the empty string, but does 788 // The hidden_string is special because it is the empty string, but does
796 // not match the empty string. 789 // not match the empty string.
797 String* hidden_string() { return hidden_string_; } 790 String* hidden_string() { return hidden_string_; }
798 791
799 void set_native_contexts_list(Object* object) { 792 void set_native_contexts_list(Object* object) {
800 native_contexts_list_ = object; 793 native_contexts_list_ = object;
801 } 794 }
802 Object* native_contexts_list() const { return native_contexts_list_; } 795 Object* native_contexts_list() const { return native_contexts_list_; }
803 796
804 void set_array_buffers_list(Object* object) { array_buffers_list_ = object; } 797 void set_array_buffers_list(Object* object) { array_buffers_list_ = object; }
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
1062 // Declare all the root indices. This defines the root list order. 1055 // Declare all the root indices. This defines the root list order.
1063 enum RootListIndex { 1056 enum RootListIndex {
1064 #define ROOT_INDEX_DECLARATION(type, name, camel_name) k##camel_name##RootIndex, 1057 #define ROOT_INDEX_DECLARATION(type, name, camel_name) k##camel_name##RootIndex,
1065 STRONG_ROOT_LIST(ROOT_INDEX_DECLARATION) 1058 STRONG_ROOT_LIST(ROOT_INDEX_DECLARATION)
1066 #undef ROOT_INDEX_DECLARATION 1059 #undef ROOT_INDEX_DECLARATION
1067 1060
1068 #define STRING_INDEX_DECLARATION(name, str) k##name##RootIndex, 1061 #define STRING_INDEX_DECLARATION(name, str) k##name##RootIndex,
1069 INTERNALIZED_STRING_LIST(STRING_INDEX_DECLARATION) 1062 INTERNALIZED_STRING_LIST(STRING_INDEX_DECLARATION)
1070 #undef STRING_DECLARATION 1063 #undef STRING_DECLARATION
1071 1064
1072 #define SYMBOL_INDEX_DECLARATION(name) k##name##RootIndex,
1073 PRIVATE_SYMBOL_LIST(SYMBOL_INDEX_DECLARATION)
1074 #undef SYMBOL_INDEX_DECLARATION
1075
1076 // Utility type maps 1065 // Utility type maps
1077 #define DECLARE_STRUCT_MAP(NAME, Name, name) k##Name##MapRootIndex, 1066 #define DECLARE_STRUCT_MAP(NAME, Name, name) k##Name##MapRootIndex,
1078 STRUCT_LIST(DECLARE_STRUCT_MAP) 1067 STRUCT_LIST(DECLARE_STRUCT_MAP)
1079 #undef DECLARE_STRUCT_MAP 1068 #undef DECLARE_STRUCT_MAP
1080 kStringTableRootIndex, 1069 kStringTableRootIndex,
1081 1070
1082 #define ROOT_INDEX_DECLARATION(type, name, camel_name) k##camel_name##RootIndex, 1071 #define ROOT_INDEX_DECLARATION(type, name, camel_name) k##camel_name##RootIndex,
1083 SMI_ROOT_LIST(ROOT_INDEX_DECLARATION) 1072 SMI_ROOT_LIST(ROOT_INDEX_DECLARATION)
1084 #undef ROOT_INDEX_DECLARATION 1073 #undef ROOT_INDEX_DECLARATION
1085 kRootListLength, 1074 kRootListLength,
(...skipping 1420 matching lines...) Expand 10 before | Expand all | Expand 10 after
2506 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. 2495 DisallowHeapAllocation no_allocation; // i.e. no gc allowed.
2507 2496
2508 private: 2497 private:
2509 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); 2498 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer);
2510 }; 2499 };
2511 #endif // DEBUG 2500 #endif // DEBUG
2512 } 2501 }
2513 } // namespace v8::internal 2502 } // namespace v8::internal
2514 2503
2515 #endif // V8_HEAP_HEAP_H_ 2504 #endif // V8_HEAP_HEAP_H_
OLDNEW
« no previous file with comments | « src/heap-snapshot-generator.cc ('k') | src/heap/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698