8 #include "src/accessors.h" 9 #include "src/globals.h" 10 #include "src/heap-symbols.h" 11 #include "src/objects-definitions.h" 12 #include "src/objects/slots.h" 18 enum ElementsKind : uint8_t;
19 class FixedTypedArrayBase;
30 #define STRONG_READ_ONLY_ROOT_LIST(V) \ 34 V(Map, free_space_map, FreeSpaceMap) \ 35 V(Map, one_pointer_filler_map, OnePointerFillerMap) \ 36 V(Map, two_pointer_filler_map, TwoPointerFillerMap) \ 37 V(Oddball*, uninitialized_value, UninitializedValue) \ 38 V(Oddball*, undefined_value, UndefinedValue) \ 39 V(Oddball*, the_hole_value, TheHoleValue) \ 40 V(Oddball*, null_value, NullValue) \ 41 V(Oddball*, true_value, TrueValue) \ 42 V(Oddball*, false_value, FalseValue) \ 43 V(String, empty_string, empty_string) \ 44 V(Map, meta_map, MetaMap) \ 45 V(Map, byte_array_map, ByteArrayMap) \ 46 V(Map, fixed_array_map, FixedArrayMap) \ 47 V(Map, fixed_cow_array_map, FixedCOWArrayMap) \ 48 V(Map, hash_table_map, HashTableMap) \ 49 V(Map, symbol_map, SymbolMap) \ 50 V(Map, one_byte_string_map, OneByteStringMap) \ 51 V(Map, one_byte_internalized_string_map, OneByteInternalizedStringMap) \ 52 V(Map, scope_info_map, ScopeInfoMap) \ 53 V(Map, shared_function_info_map, SharedFunctionInfoMap) \ 54 V(Map, code_map, CodeMap) \ 55 V(Map, function_context_map, FunctionContextMap) \ 56 V(Map, cell_map, CellMap) \ 57 V(Map, global_property_cell_map, GlobalPropertyCellMap) \ 58 V(Map, foreign_map, ForeignMap) \ 59 V(Map, heap_number_map, HeapNumberMap) \ 60 V(Map, transition_array_map, TransitionArrayMap) \ 61 V(Map, feedback_vector_map, FeedbackVectorMap) \ 62 V(ScopeInfo, empty_scope_info, EmptyScopeInfo) \ 63 V(FixedArray, empty_fixed_array, EmptyFixedArray) \ 64 V(DescriptorArray*, empty_descriptor_array, EmptyDescriptorArray) \ 67 V(Oddball*, arguments_marker, ArgumentsMarker) \ 68 V(Oddball*, exception, Exception) \ 69 V(Oddball*, termination_exception, TerminationException) \ 70 V(Oddball*, optimized_out, OptimizedOut) \ 71 V(Oddball*, stale_register, StaleRegister) \ 73 V(Map, native_context_map, NativeContextMap) \ 74 V(Map, module_context_map, ModuleContextMap) \ 75 V(Map, eval_context_map, EvalContextMap) \ 76 V(Map, script_context_map, ScriptContextMap) \ 77 V(Map, await_context_map, AwaitContextMap) \ 78 V(Map, block_context_map, BlockContextMap) \ 79 V(Map, catch_context_map, CatchContextMap) \ 80 V(Map, with_context_map, WithContextMap) \ 81 V(Map, debug_evaluate_context_map, DebugEvaluateContextMap) \ 82 V(Map, script_context_table_map, ScriptContextTableMap) \ 84 V(Map, feedback_metadata_map, FeedbackMetadataArrayMap) \ 85 V(Map, array_list_map, ArrayListMap) \ 86 V(Map, bigint_map, BigIntMap) \ 87 V(Map, object_boilerplate_description_map, ObjectBoilerplateDescriptionMap) \ 88 V(Map, bytecode_array_map, BytecodeArrayMap) \ 89 V(Map, code_data_container_map, CodeDataContainerMap) \ 90 V(Map, descriptor_array_map, DescriptorArrayMap) \ 91 V(Map, fixed_double_array_map, FixedDoubleArrayMap) \ 92 V(Map, global_dictionary_map, GlobalDictionaryMap) \ 93 V(Map, many_closures_cell_map, ManyClosuresCellMap) \ 94 V(Map, module_info_map, ModuleInfoMap) \ 95 V(Map, mutable_heap_number_map, MutableHeapNumberMap) \ 96 V(Map, name_dictionary_map, NameDictionaryMap) \ 97 V(Map, no_closures_cell_map, NoClosuresCellMap) \ 98 V(Map, no_feedback_cell_map, NoFeedbackCellMap) \ 99 V(Map, number_dictionary_map, NumberDictionaryMap) \ 100 V(Map, one_closure_cell_map, OneClosureCellMap) \ 101 V(Map, ordered_hash_map_map, OrderedHashMapMap) \ 102 V(Map, ordered_hash_set_map, OrderedHashSetMap) \ 103 V(Map, ordered_name_dictionary_map, OrderedNameDictionaryMap) \ 104 V(Map, pre_parsed_scope_data_map, PreParsedScopeDataMap) \ 105 V(Map, property_array_map, PropertyArrayMap) \ 106 V(Map, side_effect_call_handler_info_map, SideEffectCallHandlerInfoMap) \ 107 V(Map, side_effect_free_call_handler_info_map, \ 108 SideEffectFreeCallHandlerInfoMap) \ 109 V(Map, next_call_side_effect_free_call_handler_info_map, \ 110 NextCallSideEffectFreeCallHandlerInfoMap) \ 111 V(Map, simple_number_dictionary_map, SimpleNumberDictionaryMap) \ 112 V(Map, sloppy_arguments_elements_map, SloppyArgumentsElementsMap) \ 113 V(Map, small_ordered_hash_map_map, SmallOrderedHashMapMap) \ 114 V(Map, small_ordered_hash_set_map, SmallOrderedHashSetMap) \ 115 V(Map, small_ordered_name_dictionary_map, SmallOrderedNameDictionaryMap) \ 116 V(Map, string_table_map, StringTableMap) \ 117 V(Map, uncompiled_data_without_pre_parsed_scope_map, \ 118 UncompiledDataWithoutPreParsedScopeMap) \ 119 V(Map, uncompiled_data_with_pre_parsed_scope_map, \ 120 UncompiledDataWithPreParsedScopeMap) \ 121 V(Map, weak_fixed_array_map, WeakFixedArrayMap) \ 122 V(Map, weak_array_list_map, WeakArrayListMap) \ 123 V(Map, ephemeron_hash_table_map, EphemeronHashTableMap) \ 124 V(Map, embedder_data_array_map, EmbedderDataArrayMap) \ 126 V(Map, native_source_string_map, NativeSourceStringMap) \ 127 V(Map, string_map, StringMap) \ 128 V(Map, cons_one_byte_string_map, ConsOneByteStringMap) \ 129 V(Map, cons_string_map, ConsStringMap) \ 130 V(Map, thin_one_byte_string_map, ThinOneByteStringMap) \ 131 V(Map, thin_string_map, ThinStringMap) \ 132 V(Map, sliced_string_map, SlicedStringMap) \ 133 V(Map, sliced_one_byte_string_map, SlicedOneByteStringMap) \ 134 V(Map, external_string_map, ExternalStringMap) \ 135 V(Map, external_string_with_one_byte_data_map, \ 136 ExternalStringWithOneByteDataMap) \ 137 V(Map, external_one_byte_string_map, ExternalOneByteStringMap) \ 138 V(Map, uncached_external_string_map, UncachedExternalStringMap) \ 139 V(Map, uncached_external_string_with_one_byte_data_map, \ 140 UncachedExternalStringWithOneByteDataMap) \ 141 V(Map, internalized_string_map, InternalizedStringMap) \ 142 V(Map, external_internalized_string_map, ExternalInternalizedStringMap) \ 143 V(Map, external_internalized_string_with_one_byte_data_map, \ 144 ExternalInternalizedStringWithOneByteDataMap) \ 145 V(Map, external_one_byte_internalized_string_map, \ 146 ExternalOneByteInternalizedStringMap) \ 147 V(Map, uncached_external_internalized_string_map, \ 148 UncachedExternalInternalizedStringMap) \ 149 V(Map, uncached_external_internalized_string_with_one_byte_data_map, \ 150 UncachedExternalInternalizedStringWithOneByteDataMap) \ 151 V(Map, uncached_external_one_byte_internalized_string_map, \ 152 UncachedExternalOneByteInternalizedStringMap) \ 153 V(Map, uncached_external_one_byte_string_map, \ 154 UncachedExternalOneByteStringMap) \ 156 V(Map, fixed_uint8_array_map, FixedUint8ArrayMap) \ 157 V(Map, fixed_int8_array_map, FixedInt8ArrayMap) \ 158 V(Map, fixed_uint16_array_map, FixedUint16ArrayMap) \ 159 V(Map, fixed_int16_array_map, FixedInt16ArrayMap) \ 160 V(Map, fixed_uint32_array_map, FixedUint32ArrayMap) \ 161 V(Map, fixed_int32_array_map, FixedInt32ArrayMap) \ 162 V(Map, fixed_float32_array_map, FixedFloat32ArrayMap) \ 163 V(Map, fixed_float64_array_map, FixedFloat64ArrayMap) \ 164 V(Map, fixed_uint8_clamped_array_map, FixedUint8ClampedArrayMap) \ 165 V(Map, fixed_biguint64_array_map, FixedBigUint64ArrayMap) \ 166 V(Map, fixed_bigint64_array_map, FixedBigInt64ArrayMap) \ 168 V(Map, undefined_map, UndefinedMap) \ 169 V(Map, the_hole_map, TheHoleMap) \ 170 V(Map, null_map, NullMap) \ 171 V(Map, boolean_map, BooleanMap) \ 172 V(Map, uninitialized_map, UninitializedMap) \ 173 V(Map, arguments_marker_map, ArgumentsMarkerMap) \ 174 V(Map, exception_map, ExceptionMap) \ 175 V(Map, termination_exception_map, TerminationExceptionMap) \ 176 V(Map, optimized_out_map, OptimizedOutMap) \ 177 V(Map, stale_register_map, StaleRegisterMap) \ 178 V(Map, self_reference_marker_map, SelfReferenceMarkerMap) \ 180 V(EnumCache*, empty_enum_cache, EmptyEnumCache) \ 181 V(PropertyArray, empty_property_array, EmptyPropertyArray) \ 182 V(ByteArray, empty_byte_array, EmptyByteArray) \ 183 V(ObjectBoilerplateDescription, empty_object_boilerplate_description, \ 184 EmptyObjectBoilerplateDescription) \ 185 V(ArrayBoilerplateDescription*, empty_array_boilerplate_description, \ 186 EmptyArrayBoilerplateDescription) \ 187 V(FixedTypedArrayBase, empty_fixed_uint8_array, EmptyFixedUint8Array) \ 188 V(FixedTypedArrayBase, empty_fixed_int8_array, EmptyFixedInt8Array) \ 189 V(FixedTypedArrayBase, empty_fixed_uint16_array, EmptyFixedUint16Array) \ 190 V(FixedTypedArrayBase, empty_fixed_int16_array, EmptyFixedInt16Array) \ 191 V(FixedTypedArrayBase, empty_fixed_uint32_array, EmptyFixedUint32Array) \ 192 V(FixedTypedArrayBase, empty_fixed_int32_array, EmptyFixedInt32Array) \ 193 V(FixedTypedArrayBase, empty_fixed_float32_array, EmptyFixedFloat32Array) \ 194 V(FixedTypedArrayBase, empty_fixed_float64_array, EmptyFixedFloat64Array) \ 195 V(FixedTypedArrayBase, empty_fixed_uint8_clamped_array, \ 196 EmptyFixedUint8ClampedArray) \ 197 V(FixedTypedArrayBase, empty_fixed_biguint64_array, \ 198 EmptyFixedBigUint64Array) \ 199 V(FixedTypedArrayBase, empty_fixed_bigint64_array, EmptyFixedBigInt64Array) \ 200 V(FixedArray, empty_sloppy_arguments_elements, EmptySloppyArgumentsElements) \ 201 V(NumberDictionary, empty_slow_element_dictionary, \ 202 EmptySlowElementDictionary) \ 203 V(FixedArray, empty_ordered_hash_map, EmptyOrderedHashMap) \ 204 V(FixedArray, empty_ordered_hash_set, EmptyOrderedHashSet) \ 205 V(FeedbackMetadata*, empty_feedback_metadata, EmptyFeedbackMetadata) \ 206 V(PropertyCell*, empty_property_cell, EmptyPropertyCell) \ 207 V(NameDictionary, empty_property_dictionary, EmptyPropertyDictionary) \ 208 V(InterceptorInfo*, noop_interceptor_info, NoOpInterceptorInfo) \ 209 V(WeakFixedArray*, empty_weak_fixed_array, EmptyWeakFixedArray) \ 210 V(WeakArrayList*, empty_weak_array_list, EmptyWeakArrayList) \ 212 V(HeapNumber*, nan_value, NanValue) \ 213 V(HeapNumber*, hole_nan_value, HoleNanValue) \ 214 V(HeapNumber*, infinity_value, InfinityValue) \ 215 V(HeapNumber*, minus_zero_value, MinusZeroValue) \ 216 V(HeapNumber*, minus_infinity_value, MinusInfinityValue) \ 218 V(HeapObject*, self_reference_marker, SelfReferenceMarker) \ 220 V(ByteArray, off_heap_trampoline_relocation_info, \ 221 OffHeapTrampolineRelocationInfo) \ 223 V(ByteArray, hash_seed, HashSeed) 227 #define STRONG_MUTABLE_IMMOVABLE_ROOT_LIST(V) \ 228 ACCESSOR_INFO_ROOT_LIST(V) \ 230 V(Map, external_map, ExternalMap) \ 231 V(Map, message_object_map, JSMessageObjectMap) \ 233 V(Script*, empty_script, EmptyScript) \ 234 V(FeedbackCell*, many_closures_cell, ManyClosuresCell) \ 235 V(FeedbackCell*, no_feedback_cell, NoFeedbackCell) \ 236 V(Cell*, invalid_prototype_validity_cell, InvalidPrototypeValidityCell) \ 238 V(Cell*, array_constructor_protector, ArrayConstructorProtector) \ 239 V(PropertyCell*, no_elements_protector, NoElementsProtector) \ 240 V(Cell*, is_concat_spreadable_protector, IsConcatSpreadableProtector) \ 241 V(PropertyCell*, array_species_protector, ArraySpeciesProtector) \ 242 V(PropertyCell*, typed_array_species_protector, TypedArraySpeciesProtector) \ 243 V(PropertyCell*, regexp_species_protector, RegExpSpeciesProtector) \ 244 V(PropertyCell*, promise_species_protector, PromiseSpeciesProtector) \ 245 V(Cell*, string_length_protector, StringLengthProtector) \ 246 V(PropertyCell*, array_iterator_protector, ArrayIteratorProtector) \ 247 V(PropertyCell*, array_buffer_neutering_protector, \ 248 ArrayBufferNeuteringProtector) \ 249 V(PropertyCell*, promise_hook_protector, PromiseHookProtector) \ 250 V(Cell*, promise_resolve_protector, PromiseResolveProtector) \ 251 V(PropertyCell*, map_iterator_protector, MapIteratorProtector) \ 252 V(PropertyCell*, promise_then_protector, PromiseThenProtector) \ 253 V(PropertyCell*, set_iterator_protector, SetIteratorProtector) \ 254 V(PropertyCell*, string_iterator_protector, StringIteratorProtector) \ 256 V(FixedArray, single_character_string_cache, SingleCharacterStringCache) \ 257 V(FixedArray, string_split_cache, StringSplitCache) \ 258 V(FixedArray, regexp_multiple_cache, RegExpMultipleCache) \ 260 V(FixedArray, builtins_constants_table, BuiltinsConstantsTable) \ 262 V(Code, js_entry_code, JsEntryCode) \ 263 V(Code, js_construct_entry_code, JsConstructEntryCode) \ 264 V(Code, js_run_microtasks_entry_code, JsRunMicrotasksEntryCode) 267 #define STRONG_MUTABLE_MOVABLE_ROOT_LIST(V) \ 269 V(FixedArray, number_string_cache, NumberStringCache) \ 271 V(NameDictionary, public_symbol_table, PublicSymbolTable) \ 272 V(NameDictionary, api_symbol_table, ApiSymbolTable) \ 273 V(NameDictionary, api_private_symbol_table, ApiPrivateSymbolTable) \ 274 V(WeakArrayList*, script_list, ScriptList) \ 275 V(SimpleNumberDictionary, code_stubs, CodeStubs) \ 276 V(FixedArray, materialized_objects, MaterializedObjects) \ 277 V(WeakArrayList*, detached_contexts, DetachedContexts) \ 278 V(WeakArrayList*, retaining_path_targets, RetainingPathTargets) \ 279 V(WeakArrayList*, retained_maps, RetainedMaps) \ 281 V(Object*, feedback_vectors_for_profiling_tools, \ 282 FeedbackVectorsForProfilingTools) \ 283 V(WeakArrayList*, noscript_shared_function_infos, \ 284 NoScriptSharedFunctionInfos) \ 285 V(FixedArray, serialized_objects, SerializedObjects) \ 286 V(FixedArray, serialized_global_proxy_sizes, SerializedGlobalProxySizes) \ 287 V(TemplateList, message_listeners, MessageListeners) \ 289 V(HeapObject*, current_microtask, CurrentMicrotask) \ 291 V(Object*, dirty_js_weak_factories, DirtyJSWeakFactories) \ 293 V(HeapObject*, weak_refs_keep_during_job, WeakRefsKeepDuringJob) \ 294 V(HeapObject*, interpreter_entry_trampoline_for_profiling, \ 295 InterpreterEntryTrampolineForProfiling) 298 #define SMI_ROOT_LIST(V) \ 299 V(Smi, stack_limit, StackLimit) \ 300 V(Smi, real_stack_limit, RealStackLimit) \ 301 V(Smi, last_script_id, LastScriptId) \ 302 V(Smi, last_debugging_id, LastDebuggingId) \ 305 V(Smi, next_template_serial_number, NextTemplateSerialNumber) \ 306 V(Smi, arguments_adaptor_deopt_pc_offset, ArgumentsAdaptorDeoptPCOffset) \ 307 V(Smi, construct_stub_create_deopt_pc_offset, \ 308 ConstructStubCreateDeoptPCOffset) \ 309 V(Smi, construct_stub_invoke_deopt_pc_offset, \ 310 ConstructStubInvokeDeoptPCOffset) \ 311 V(Smi, interpreter_entry_return_pc_offset, InterpreterEntryReturnPCOffset) 315 #define INTERNALIZED_STRING_LIST_ADAPTER(V, name, ...) V(String, name, name) 318 #define INTERNALIZED_STRING_ROOT_LIST(V) \ 319 INTERNALIZED_STRING_LIST_GENERATOR(INTERNALIZED_STRING_LIST_ADAPTER, V) 322 #define SYMBOL_ROOT_LIST_ADAPTER(V, name, ...) V(Symbol, name, name) 325 #define PRIVATE_SYMBOL_ROOT_LIST(V) \ 326 PRIVATE_SYMBOL_LIST_GENERATOR(SYMBOL_ROOT_LIST_ADAPTER, V) 327 #define PUBLIC_SYMBOL_ROOT_LIST(V) \ 328 PUBLIC_SYMBOL_LIST_GENERATOR(SYMBOL_ROOT_LIST_ADAPTER, V) 329 #define WELL_KNOWN_SYMBOL_ROOT_LIST(V) \ 330 WELL_KNOWN_SYMBOL_LIST_GENERATOR(SYMBOL_ROOT_LIST_ADAPTER, V) 334 #define ACCESSOR_INFO_ROOT_LIST_ADAPTER(V, name, CamelName, ...) \ 335 V(AccessorInfo*, name##_accessor, CamelName##Accessor) 338 #define ACCESSOR_INFO_ROOT_LIST(V) \ 339 ACCESSOR_INFO_LIST_GENERATOR(ACCESSOR_INFO_ROOT_LIST_ADAPTER, V) 341 #define READ_ONLY_ROOT_LIST(V) \ 342 STRONG_READ_ONLY_ROOT_LIST(V) \ 343 INTERNALIZED_STRING_ROOT_LIST(V) \ 344 PRIVATE_SYMBOL_ROOT_LIST(V) \ 345 PUBLIC_SYMBOL_ROOT_LIST(V) \ 346 WELL_KNOWN_SYMBOL_ROOT_LIST(V) \ 347 STRUCT_MAPS_LIST(V) \ 348 ALLOCATION_SITE_MAPS_LIST(V) \ 349 DATA_HANDLER_MAPS_LIST(V) 351 #define MUTABLE_ROOT_LIST(V) \ 352 STRONG_MUTABLE_IMMOVABLE_ROOT_LIST(V) \ 353 STRONG_MUTABLE_MOVABLE_ROOT_LIST(V) \ 354 V(StringTable, string_table, StringTable) \ 357 #define ROOT_LIST(V) \ 358 READ_ONLY_ROOT_LIST(V) \ 363 enum class RootIndex : uint16_t {
364 #define DECL(type, name, CamelName) k##CamelName, 372 kLastRoot = kRootListLength - 1,
375 kReadOnlyRootsCount = 0 READ_ONLY_ROOT_LIST(ROOT),
376 kImmortalImmovableRootsCount =
377 kReadOnlyRootsCount STRONG_MUTABLE_IMMOVABLE_ROOT_LIST(ROOT),
379 kFirstReadOnlyRoot = kFirstRoot,
380 kLastReadOnlyRoot = kFirstReadOnlyRoot + kReadOnlyRootsCount - 1,
384 kFirstStrongRoot = kLastReadOnlyRoot + 1,
386 kLastStrongRoot = kStringTable - 1,
389 kFirstStrongOrReadOnlyRoot = kFirstRoot,
390 kLastStrongOrReadOnlyRoot = kLastStrongRoot,
393 kFirstImmortalImmovableRoot = kFirstReadOnlyRoot,
394 kLastImmortalImmovableRoot =
395 kFirstImmortalImmovableRoot + kImmortalImmovableRootsCount - 1,
397 kFirstSmiRoot = kStringTable + 1,
398 kLastSmiRoot = kLastRoot
405 static constexpr
size_t kEntriesCount =
406 static_cast<size_t>(RootIndex::kRootListLength);
410 inline bool IsRootHandleLocation(
Address* handle_location,
411 RootIndex* index)
const;
413 template <
typename T>
414 bool IsRootHandle(
Handle<T> handle, RootIndex* index)
const;
416 Object*
const& operator[](RootIndex root_index)
const {
417 size_t index =
static_cast<size_t>(root_index);
418 DCHECK_LT(index, kEntriesCount);
419 return roots_[index];
422 static const char* name(RootIndex root_index) {
423 size_t index =
static_cast<size_t>(root_index);
424 DCHECK_LT(index, kEntriesCount);
425 return root_names_[index];
428 static constexpr
int offset_of(RootIndex root_index) {
429 return static_cast<int>(root_index) * kPointerSize;
432 static RootIndex RootIndexForFixedTypedArray(ExternalArrayType array_type);
433 static RootIndex RootIndexForFixedTypedArray(ElementsKind elements_kind);
434 static RootIndex RootIndexForEmptyFixedTypedArray(ElementsKind elements_kind);
442 static constexpr
bool IsImmortalImmovable(RootIndex root_index) {
443 STATIC_ASSERT(static_cast<int>(RootIndex::kFirstImmortalImmovableRoot) ==
445 return static_cast<unsigned>(root_index) <=
446 static_cast<unsigned>(RootIndex::kLastImmortalImmovableRoot);
451 return ObjectSlot(&roots_[static_cast<size_t>(RootIndex::kFirstRoot)]);
454 return ObjectSlot(&roots_[static_cast<size_t>(RootIndex::kLastRoot) + 1]);
458 ObjectSlot strong_or_read_only_roots_begin() {
459 STATIC_ASSERT(static_cast<size_t>(RootIndex::kLastReadOnlyRoot) ==
460 static_cast<size_t>(RootIndex::kFirstStrongRoot) - 1);
462 &roots_[static_cast<size_t>(RootIndex::kFirstStrongOrReadOnlyRoot)]);
466 &roots_[static_cast<size_t>(RootIndex::kLastStrongOrReadOnlyRoot) + 1]);
473 &roots_[static_cast<size_t>(RootIndex::kFirstReadOnlyRoot)]);
477 &roots_[static_cast<size_t>(RootIndex::kLastReadOnlyRoot) + 1]);
482 &roots_[static_cast<size_t>(RootIndex::kFirstStrongRoot)]);
486 &roots_[static_cast<size_t>(RootIndex::kLastStrongRoot) + 1]);
490 return ObjectSlot(&roots_[static_cast<size_t>(RootIndex::kFirstSmiRoot)]);
494 &roots_[static_cast<size_t>(RootIndex::kLastSmiRoot) + 1]);
497 Object*& operator[](RootIndex root_index) {
498 size_t index =
static_cast<size_t>(root_index);
499 DCHECK_LT(index, kEntriesCount);
500 return roots_[index];
503 Object* roots_[kEntriesCount];
504 static const char* root_names_[kEntriesCount];
519 #define ROOT_ACCESSOR(Type, name, CamelName) \ 520 V8_INLINE class Type name() const; \ 521 V8_INLINE Handle<std::remove_pointer<Type>::type> name##_handle() const; 523 READ_ONLY_ROOT_LIST(ROOT_ACCESSOR)
526 V8_INLINE
Map MapForFixedTypedArray(ExternalArrayType array_type);
527 V8_INLINE
Map MapForFixedTypedArray(ElementsKind elements_kind);
542 #endif // V8_ROOTS_H_