1 // Copyright 2019 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_OBJECTS_OBJECT_LIST_MACROS_H_ 6 #define V8_OBJECTS_OBJECT_LIST_MACROS_H_ 7 8 #include "torque-generated/instance-types.h" 9 10 namespace v8 { 11 namespace internal { 12 13 class AbstractCode; 14 class AccessorPair; 15 class AccessCheckInfo; 16 class AllocationSite; 17 class ByteArray; 18 class CachedTemplateObject; 19 class Cell; 20 class ClosureFeedbackCellArray; 21 class ConsString; 22 class DependentCode; 23 class ElementsAccessor; 24 class EnumCache; 25 class FixedArrayBase; 26 class FixedDoubleArray; 27 class FreeSpace; 28 class FunctionLiteral; 29 class FunctionTemplateInfo; 30 class JSAsyncGeneratorObject; 31 class JSGlobalProxy; 32 class SourceTextModule; 33 class JSPromise; 34 class JSProxy; 35 class JSProxyRevocableResult; 36 class KeyAccumulator; 37 class LayoutDescriptor; 38 class LookupIterator; 39 class FieldType; 40 class Module; 41 class SourceTextModuleInfoEntry; 42 class HeapNumber; 43 class ObjectHashTable; 44 class ObjectTemplateInfo; 45 class ObjectVisitor; 46 class OSROptimizedCodeCache; 47 class PreparseData; 48 class PropertyArray; 49 class PropertyCell; 50 class PropertyDescriptor; 51 class PrototypeInfo; 52 class ReadOnlyRoots; 53 class RegExpMatchInfo; 54 class RootVisitor; 55 class SafepointEntry; 56 class ScriptContextTable; 57 class SharedFunctionInfo; 58 class StringStream; 59 class Symbol; 60 class SyntheticModule; 61 class FeedbackCell; 62 class FeedbackMetadata; 63 class FeedbackVector; 64 class UncompiledData; 65 class TemplateInfo; 66 class TransitionArray; 67 class TemplateList; 68 class WasmInstanceObject; 69 class WasmMemoryObject; 70 template <typename T> 71 class ZoneForwardList; 72 73 #define OBJECT_TYPE_LIST(V) \ 74 V(LayoutDescriptor) \ 75 V(Primitive) \ 76 V(Number) \ 77 V(Numeric) 78 79 #define HEAP_OBJECT_ORDINARY_TYPE_LIST_BASE(V) \ 80 V(AbstractCode) \ 81 V(AccessCheckNeeded) \ 82 V(AllocationSite) \ 83 V(ArrayList) \ 84 V(BigInt) \ 85 V(BigIntBase) \ 86 V(BigIntWrapper) \ 87 V(ObjectBoilerplateDescription) \ 88 V(Boolean) \ 89 V(BooleanWrapper) \ 90 V(ByteArray) \ 91 V(BytecodeArray) \ 92 V(CallHandlerInfo) \ 93 V(Callable) \ 94 V(Cell) \ 95 V(ClassBoilerplate) \ 96 V(Code) \ 97 V(CodeDataContainer) \ 98 V(CompilationCacheTable) \ 99 V(ConsString) \ 100 V(Constructor) \ 101 V(Context) \ 102 V(CoverageInfo) \ 103 V(ClosureFeedbackCellArray) \ 104 V(DataHandler) \ 105 V(DeoptimizationData) \ 106 V(DependentCode) \ 107 V(EmbedderDataArray) \ 108 V(EphemeronHashTable) \ 109 V(ExternalOneByteString) \ 110 V(ExternalString) \ 111 V(ExternalTwoByteString) \ 112 V(FeedbackCell) \ 113 V(FeedbackMetadata) \ 114 V(FeedbackVector) \ 115 V(Filler) \ 116 V(FixedArray) \ 117 V(FixedArrayBase) \ 118 V(FixedArrayExact) \ 119 V(FixedDoubleArray) \ 120 V(Foreign) \ 121 V(FrameArray) \ 122 V(FreeSpace) \ 123 V(Function) \ 124 V(GlobalDictionary) \ 125 V(HandlerTable) \ 126 V(HeapNumber) \ 127 V(InternalizedString) \ 128 V(JSArgumentsObject) \ 129 V(JSArray) \ 130 V(JSArrayBuffer) \ 131 V(JSArrayBufferView) \ 132 V(JSArrayIterator) \ 133 V(JSAsyncFromSyncIterator) \ 134 V(JSAsyncFunctionObject) \ 135 V(JSAsyncGeneratorObject) \ 136 V(JSBoundFunction) \ 137 V(JSCollection) \ 138 V(JSCollectionIterator) \ 139 V(JSContextExtensionObject) \ 140 V(JSCustomElementsObject) \ 141 V(JSDataView) \ 142 V(JSDate) \ 143 V(JSError) \ 144 V(JSFinalizationRegistry) \ 145 V(JSFunction) \ 146 V(JSFunctionOrBoundFunction) \ 147 V(JSGeneratorObject) \ 148 V(JSGlobalObject) \ 149 V(JSGlobalProxy) \ 150 V(JSMap) \ 151 V(JSMapIterator) \ 152 V(JSMessageObject) \ 153 V(JSModuleNamespace) \ 154 V(JSObject) \ 155 V(JSPrimitiveWrapper) \ 156 V(JSPromise) \ 157 V(JSProxy) \ 158 V(JSReceiver) \ 159 V(JSRegExp) \ 160 V(JSRegExpStringIterator) \ 161 V(JSSet) \ 162 V(JSSetIterator) \ 163 V(JSSpecialObject) \ 164 V(JSStringIterator) \ 165 V(JSTypedArray) \ 166 V(JSWeakCollection) \ 167 V(JSWeakRef) \ 168 V(JSWeakMap) \ 169 V(JSWeakSet) \ 170 V(LoadHandler) \ 171 V(Map) \ 172 V(MapCache) \ 173 V(Module) \ 174 V(Microtask) \ 175 V(Name) \ 176 V(NameDictionary) \ 177 V(NativeContext) \ 178 V(NormalizedMapCache) \ 179 V(NumberDictionary) \ 180 V(NumberWrapper) \ 181 V(ObjectHashSet) \ 182 V(ObjectHashTable) \ 183 V(OrderedHashMap) \ 184 V(OrderedHashSet) \ 185 V(OrderedNameDictionary) \ 186 V(OSROptimizedCodeCache) \ 187 V(PreparseData) \ 188 V(PrimitiveHeapObject) \ 189 V(PromiseReactionJobTask) \ 190 V(PropertyArray) \ 191 V(PropertyCell) \ 192 V(RegExpMatchInfo) \ 193 V(ScopeInfo) \ 194 V(ScriptContextTable) \ 195 V(ScriptWrapper) \ 196 V(SeqOneByteString) \ 197 V(SeqString) \ 198 V(SeqTwoByteString) \ 199 V(SharedFunctionInfo) \ 200 V(SimpleNumberDictionary) \ 201 V(SlicedString) \ 202 V(SmallOrderedHashMap) \ 203 V(SmallOrderedHashSet) \ 204 V(SmallOrderedNameDictionary) \ 205 V(SourceTextModule) \ 206 V(SourceTextModuleInfo) \ 207 V(StoreHandler) \ 208 V(String) \ 209 V(StringSet) \ 210 V(StringWrapper) \ 211 V(Struct) \ 212 V(Symbol) \ 213 V(SymbolWrapper) \ 214 V(SyntheticModule) \ 215 V(TemplateInfo) \ 216 V(TemplateList) \ 217 V(ThinString) \ 218 V(TransitionArray) \ 219 V(UncompiledData) \ 220 V(UncompiledDataWithPreparseData) \ 221 V(UncompiledDataWithoutPreparseData) \ 222 V(Undetectable) \ 223 V(UniqueName) \ 224 V(WasmArray) \ 225 V(WasmExceptionObject) \ 226 V(WasmExceptionPackage) \ 227 V(WasmGlobalObject) \ 228 V(WasmInstanceObject) \ 229 V(WasmMemoryObject) \ 230 V(WasmModuleObject) \ 231 V(WasmStruct) \ 232 V(WasmTypeInfo) \ 233 V(WasmTableObject) \ 234 V(WeakFixedArray) \ 235 V(WeakArrayList) \ 236 V(WeakCell) \ 237 TORQUE_DEFINED_CLASS_LIST(V) 238 239 #ifdef V8_INTL_SUPPORT 240 #define HEAP_OBJECT_ORDINARY_TYPE_LIST(V) \ 241 HEAP_OBJECT_ORDINARY_TYPE_LIST_BASE(V) \ 242 V(JSV8BreakIterator) \ 243 V(JSCollator) \ 244 V(JSDateTimeFormat) \ 245 V(JSDisplayNames) \ 246 V(JSListFormat) \ 247 V(JSLocale) \ 248 V(JSNumberFormat) \ 249 V(JSPluralRules) \ 250 V(JSRelativeTimeFormat) \ 251 V(JSSegmentIterator) \ 252 V(JSSegmenter) \ 253 V(JSSegments) 254 #else 255 #define HEAP_OBJECT_ORDINARY_TYPE_LIST(V) HEAP_OBJECT_ORDINARY_TYPE_LIST_BASE(V) 256 #endif // V8_INTL_SUPPORT 257 258 #define HEAP_OBJECT_TEMPLATE_TYPE_LIST(V) V(HashTable) 259 260 // Logical sub-types of heap objects that don't correspond to a C++ class but 261 // represent some specialization in terms of additional constraints. 262 #define HEAP_OBJECT_SPECIALIZED_TYPE_LIST(V) \ 263 V(AwaitContext) \ 264 V(BlockContext) \ 265 V(CallableApiObject) \ 266 V(CallableJSProxy) \ 267 V(CatchContext) \ 268 V(DebugEvaluateContext) \ 269 V(EvalContext) \ 270 V(FreeSpaceOrFiller) \ 271 V(FunctionContext) \ 272 V(JSApiObject) \ 273 V(JSMapKeyIterator) \ 274 V(JSMapKeyValueIterator) \ 275 V(JSMapValueIterator) \ 276 V(JSSetKeyValueIterator) \ 277 V(JSSetValueIterator) \ 278 V(JSSpecialApiObject) \ 279 V(ModuleContext) \ 280 V(NonNullForeign) \ 281 V(ScriptContext) \ 282 V(WithContext) 283 284 #define HEAP_OBJECT_TYPE_LIST(V) \ 285 HEAP_OBJECT_ORDINARY_TYPE_LIST(V) \ 286 HEAP_OBJECT_TEMPLATE_TYPE_LIST(V) \ 287 HEAP_OBJECT_SPECIALIZED_TYPE_LIST(V) 288 289 #define ODDBALL_LIST(V) \ 290 V(Undefined, undefined_value) \ 291 V(Null, null_value) \ 292 V(TheHole, the_hole_value) \ 293 V(Exception, exception) \ 294 V(Uninitialized, uninitialized_value) \ 295 V(True, true_value) \ 296 V(False, false_value) \ 297 V(ArgumentsMarker, arguments_marker) \ 298 V(OptimizedOut, optimized_out) \ 299 V(StaleRegister, stale_register) 300 301 } // namespace internal 302 } // namespace v8 303 304 #endif // V8_OBJECTS_OBJECT_LIST_MACROS_H_ 305