v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
heap-object-list.h
Go to the documentation of this file.
1// Copyright 2024 the V8 project authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef V8_CODEGEN_HEAP_OBJECT_LIST_H_
6#define V8_CODEGEN_HEAP_OBJECT_LIST_H_
7
8#define BUILTINS_WITH_SFI_OBJECT_LIST_ADAPTER(V, CamelName, underscore_name, \
9 ...) \
10 V(CamelName##SharedFun, underscore_name##_shared_fun, CamelName##SharedFun)
11
12#define BUILTINS_WITH_SFI_OBJECT_LIST(V) \
13 BUILTINS_WITH_SFI_LIST_GENERATOR(BUILTINS_WITH_SFI_OBJECT_LIST_ADAPTER, V)
14
15#define HEAP_MUTABLE_IMMOVABLE_OBJECT_LIST(V) \
16 V(ArrayIteratorProtector, array_iterator_protector, ArrayIteratorProtector) \
17 V(ArraySpeciesProtector, array_species_protector, ArraySpeciesProtector) \
18 V(IsConcatSpreadableProtector, is_concat_spreadable_protector, \
19 IsConcatSpreadableProtector) \
20 V(MapIteratorProtector, map_iterator_protector, MapIteratorProtector) \
21 V(NoElementsProtector, no_elements_protector, NoElementsProtector) \
22 V(MegaDOMProtector, mega_dom_protector, MegaDOMProtector) \
23 V(NumberStringCache, number_string_cache, NumberStringCache) \
24 V(NumberStringNotRegexpLikeProtector, \
25 number_string_not_regexp_like_protector, \
26 NumberStringNotRegexpLikeProtector) \
27 V(PromiseResolveProtector, promise_resolve_protector, \
28 PromiseResolveProtector) \
29 V(PromiseSpeciesProtector, promise_species_protector, \
30 PromiseSpeciesProtector) \
31 V(PromiseThenProtector, promise_then_protector, PromiseThenProtector) \
32 V(RegExpSpeciesProtector, regexp_species_protector, RegExpSpeciesProtector) \
33 V(SetIteratorProtector, set_iterator_protector, SetIteratorProtector) \
34 V(StringIteratorProtector, string_iterator_protector, \
35 StringIteratorProtector) \
36 V(StringWrapperToPrimitiveProtector, string_wrapper_to_primitive_protector, \
37 StringWrapperToPrimitiveProtector) \
38 V(TypedArrayLengthProtector, typed_array_length_protector, \
39 TypedArrayLengthProtector) \
40 V(TypedArraySpeciesProtector, typed_array_species_protector, \
41 TypedArraySpeciesProtector) \
42 BUILTINS_WITH_SFI_OBJECT_LIST(V)
43
44#define UNIQUE_INSTANCE_TYPE_IMMUTABLE_IMMOVABLE_MAP_ADAPTER( \
45 V, rootIndexName, rootAccessorName, class_name) \
46 V(rootIndexName, rootAccessorName, class_name##Map)
47
48#define HEAP_IMMUTABLE_IMMOVABLE_OBJECT_LIST(V) \
49 V(AllocationSiteWithoutWeakNextMap, allocation_site_without_weaknext_map, \
50 AllocationSiteWithoutWeakNextMap) \
51 V(AllocationSiteWithWeakNextMap, allocation_site_map, AllocationSiteMap) \
52 V(arguments_to_string, arguments_to_string, ArgumentsToString) \
53 V(ArrayListMap, array_list_map, ArrayListMap) \
54 V(Array_string, Array_string, ArrayString) \
55 V(array_to_string, array_to_string, ArrayToString) \
56 V(BooleanMap, boolean_map, BooleanMap) \
57 V(boolean_to_string, boolean_to_string, BooleanToString) \
58 V(class_fields_symbol, class_fields_symbol, ClassFieldsSymbol) \
59 V(ConsOneByteStringMap, cons_one_byte_string_map, ConsOneByteStringMap) \
60 V(ConsTwoByteStringMap, cons_two_byte_string_map, ConsTwoByteStringMap) \
61 V(constructor_string, constructor_string, ConstructorString) \
62 V(date_to_string, date_to_string, DateToString) \
63 V(default_string, default_string, DefaultString) \
64 V(EmptyArrayList, empty_array_list, EmptyArrayList) \
65 V(EmptyByteArray, empty_byte_array, EmptyByteArray) \
66 V(EmptyFixedArray, empty_fixed_array, EmptyFixedArray) \
67 V(EmptyOrderedHashSet, empty_ordered_hash_set, EmptyOrderedHashSet) \
68 V(EmptyScopeInfo, empty_scope_info, EmptyScopeInfo) \
69 V(EmptyPropertyDictionary, empty_property_dictionary, \
70 EmptyPropertyDictionary) \
71 V(EmptyOrderedPropertyDictionary, empty_ordered_property_dictionary, \
72 EmptyOrderedPropertyDictionary) \
73 V(EmptySwissPropertyDictionary, empty_swiss_property_dictionary, \
74 EmptySwissPropertyDictionary) \
75 V(EmptySlowElementDictionary, empty_slow_element_dictionary, \
76 EmptySlowElementDictionary) \
77 V(empty_string, empty_string, EmptyString) \
78 V(error_to_string, error_to_string, ErrorToString) \
79 V(error_string, error_string, ErrorString) \
80 V(errors_string, errors_string, ErrorsString) \
81 V(FalseValue, false_value, False) \
82 V(FixedArrayMap, fixed_array_map, FixedArrayMap) \
83 V(FixedCOWArrayMap, fixed_cow_array_map, FixedCOWArrayMap) \
84 V(Function_string, function_string, FunctionString) \
85 V(function_to_string, function_to_string, FunctionToString) \
86 V(get_string, get_string, GetString) \
87 V(has_instance_symbol, has_instance_symbol, HasInstanceSymbol) \
88 V(has_string, has_string, HasString) \
89 V(Infinity_string, Infinity_string, InfinityString) \
90 V(is_concat_spreadable_symbol, is_concat_spreadable_symbol, \
91 IsConcatSpreadableSymbol) \
92 V(Iterator_string, Iterator_string, IteratorString) \
93 V(iterator_symbol, iterator_symbol, IteratorSymbol) \
94 V(keys_string, keys_string, KeysString) \
95 V(async_iterator_symbol, async_iterator_symbol, AsyncIteratorSymbol) \
96 V(length_string, length_string, LengthString) \
97 V(ManyClosuresCellMap, many_closures_cell_map, ManyClosuresCellMap) \
98 V(match_symbol, match_symbol, MatchSymbol) \
99 V(megamorphic_symbol, megamorphic_symbol, MegamorphicSymbol) \
100 V(mega_dom_symbol, mega_dom_symbol, MegaDOMSymbol) \
101 V(message_string, message_string, MessageString) \
102 V(minus_Infinity_string, minus_Infinity_string, MinusInfinityString) \
103 V(MinusZeroValue, minus_zero_value, MinusZero) \
104 V(name_string, name_string, NameString) \
105 V(NanValue, nan_value, Nan) \
106 V(NaN_string, NaN_string, NaNString) \
107 V(next_string, next_string, NextString) \
108 V(NoClosuresCellMap, no_closures_cell_map, NoClosuresCellMap) \
109 V(null_to_string, null_to_string, NullToString) \
110 V(NullValue, null_value, Null) \
111 IF_WASM(V, WasmNull, wasm_null, WasmNull) \
112 V(number_string, number_string, NumberString) \
113 V(number_to_string, number_to_string, NumberToString) \
114 V(Object_string, Object_string, ObjectString) \
115 V(object_string, object_string, objectString) \
116 V(object_to_string, object_to_string, ObjectToString) \
117 V(SeqOneByteStringMap, seq_one_byte_string_map, SeqOneByteStringMap) \
118 V(OneClosureCellMap, one_closure_cell_map, OneClosureCellMap) \
119 V(OnePointerFillerMap, one_pointer_filler_map, OnePointerFillerMap) \
120 V(PromiseCapabilityMap, promise_capability_map, PromiseCapabilityMap) \
121 V(promise_forwarding_handler_symbol, promise_forwarding_handler_symbol, \
122 PromiseForwardingHandlerSymbol) \
123 V(PromiseFulfillReactionJobTaskMap, promise_fulfill_reaction_job_task_map, \
124 PromiseFulfillReactionJobTaskMap) \
125 V(promise_handled_by_symbol, promise_handled_by_symbol, \
126 PromiseHandledBySymbol) \
127 V(PromiseReactionMap, promise_reaction_map, PromiseReactionMap) \
128 V(PromiseRejectReactionJobTaskMap, promise_reject_reaction_job_task_map, \
129 PromiseRejectReactionJobTaskMap) \
130 V(PromiseResolveThenableJobTaskMap, promise_resolve_thenable_job_task_map, \
131 PromiseResolveThenableJobTaskMap) \
132 V(prototype_string, prototype_string, PrototypeString) \
133 V(replace_symbol, replace_symbol, ReplaceSymbol) \
134 V(regexp_to_string, regexp_to_string, RegexpToString) \
135 V(resolve_string, resolve_string, ResolveString) \
136 V(return_string, return_string, ReturnString) \
137 V(search_symbol, search_symbol, SearchSymbol) \
138 V(SingleCharacterStringTable, single_character_string_table, \
139 SingleCharacterStringTable) \
140 V(size_string, size_string, SizeString) \
141 V(species_symbol, species_symbol, SpeciesSymbol) \
142 V(StaleRegister, stale_register, StaleRegister) \
143 V(StoreHandler0Map, store_handler0_map, StoreHandler0Map) \
144 V(string_string, string_string, StringString) \
145 V(string_to_string, string_to_string, StringToString) \
146 V(suppressed_string, suppressed_string, SuppressedString) \
147 V(SeqTwoByteStringMap, seq_two_byte_string_map, SeqTwoByteStringMap) \
148 V(TheHoleValue, the_hole_value, TheHole) \
149 V(PropertyCellHoleValue, property_cell_hole_value, PropertyCellHole) \
150 V(HashTableHoleValue, hash_table_hole_value, HashTableHole) \
151 V(PromiseHoleValue, promise_hole_value, PromiseHole) \
152 V(then_string, then_string, ThenString) \
153 V(toJSON_string, toJSON_string, ToJSONString) \
154 V(toString_string, toString_string, ToStringString) \
155 V(to_primitive_symbol, to_primitive_symbol, ToPrimitiveSymbol) \
156 V(to_string_tag_symbol, to_string_tag_symbol, ToStringTagSymbol) \
157 V(TrueValue, true_value, True) \
158 V(undefined_to_string, undefined_to_string, UndefinedToString) \
159 V(UndefinedValue, undefined_value, Undefined) \
160 V(uninitialized_symbol, uninitialized_symbol, UninitializedSymbol) \
161 V(valueOf_string, valueOf_string, ValueOfString) \
162 V(wasm_cross_instance_call_symbol, wasm_cross_instance_call_symbol, \
163 WasmCrossInstanceCallSymbol) \
164 V(zero_string, zero_string, ZeroString) \
165 UNIQUE_INSTANCE_TYPE_MAP_LIST_GENERATOR( \
166 UNIQUE_INSTANCE_TYPE_IMMUTABLE_IMMOVABLE_MAP_ADAPTER, V)
167
168#define HEAP_IMMOVABLE_OBJECT_LIST(V) \
169 HEAP_MUTABLE_IMMOVABLE_OBJECT_LIST(V) \
170 HEAP_IMMUTABLE_IMMOVABLE_OBJECT_LIST(V)
171
172#endif // V8_CODEGEN_HEAP_OBJECT_LIST_H_