5#ifndef RUNTIME_VM_CLASS_ID_H_
6#define RUNTIME_VM_CLASS_ID_H_
26#define CLASS_LIST_INTERNAL_ONLY(V) \
32 V(FfiTrampolineData) \
37 V(KernelProgramInfo) \
38 V(WeakSerializationReference) \
42 V(InstructionsSection) \
43 V(InstructionsTable) \
47 V(CompressedStackMaps) \
48 V(LocalVarDescriptors) \
49 V(ExceptionHandlers) \
53 V(SingleTargetCache) \
55 V(MonomorphicSmiableCall) \
64 V(UnhandledException) \
70#define CLASS_LIST_INSTANCE_SINGLETONS(V) \
96 V(ExternalTypedData) \
111 V(TransferableTypedData)
113#define CLASS_LIST_NO_OBJECT_NOR_STRING_NOR_ARRAY_NOR_MAP(V) \
114 CLASS_LIST_INTERNAL_ONLY(V) CLASS_LIST_INSTANCE_SINGLETONS(V)
116#define CLASS_LIST_MAPS(V) \
120#define CLASS_LIST_SETS(V) \
124#define CLASS_LIST_FIXED_LENGTH_ARRAYS(V) \
128#define CLASS_LIST_ARRAYS(V) \
129 CLASS_LIST_FIXED_LENGTH_ARRAYS(V) \
130 V(GrowableObjectArray)
132#define CLASS_LIST_STRINGS(V) \
137#define CLASS_LIST_TYPED_DATA(V) \
140 V(Uint8ClampedArray) \
153#define CLASS_LIST_FFI_NUMERIC_FIXED_SIZE(V) \
165#define CLASS_LIST_FFI_TYPE_MARKER(V) \
166 CLASS_LIST_FFI_NUMERIC_FIXED_SIZE(V) \
171#define CLASS_LIST_FFI(V) \
173 CLASS_LIST_FFI_TYPE_MARKER(V) \
177#define DART_CLASS_LIST_TYPED_DATA(V) \
193#define CLASS_LIST_FOR_HANDLES(V) \
194 CLASS_LIST_NO_OBJECT_NOR_STRING_NOR_ARRAY_NOR_MAP(V) \
198 V(GrowableObjectArray) \
201#define CLASS_LIST_NO_OBJECT(V) \
202 CLASS_LIST_NO_OBJECT_NOR_STRING_NOR_ARRAY_NOR_MAP(V) \
205 CLASS_LIST_ARRAYS(V) \
206 CLASS_LIST_STRINGS(V)
208#define CLASS_LIST(V) \
210 CLASS_LIST_NO_OBJECT(V)
228#define DEFINE_OBJECT_KIND(clazz) k##clazz##Cid,
230#undef DEFINE_OBJECT_KIND
233#define DEFINE_OBJECT_KIND(clazz) kFfi##clazz##Cid,
235#undef DEFINE_OBJECT_KIND
237#define DEFINE_OBJECT_KIND(clazz) \
238 kTypedData##clazz##Cid, \
239 kTypedData##clazz##ViewCid, \
240 kExternalTypedData##clazz##Cid, \
241 kUnmodifiableTypedData##clazz##ViewCid,
243#undef DEFINE_OBJECT_KIND
328 kRecordTypeCid == kTypeCid + 2 &&
329 kTypeParameterCid == kTypeCid + 3);
330 return (index >= kTypeCid && index <= kTypeParameterCid);
335 COMPILE_ASSERT(kIntegerCid == kNumberCid + 1 && kSmiCid == kNumberCid + 2 &&
336 kMintCid == kNumberCid + 3 && kDoubleCid == kNumberCid + 4);
337 return (index >= kNumberCid && index <= kDoubleCid);
342 COMPILE_ASSERT(kSmiCid == kIntegerCid + 1 && kMintCid == kIntegerCid + 2);
343 return (index >= kIntegerCid && index <= kMintCid);
348 kTwoByteStringCid == kStringCid + 2);
351 return (index >= kStringCid && index <= kTwoByteStringCid);
355 return (index == kOneByteStringCid);
361 return (index >= kArrayCid && index <= kGrowableObjectArrayCid);
373 return index == kTypeCid || index == kFunctionTypeCid ||
374 index == kRecordTypeCid;
379 kUnmodifiableTypedDataFloat64x2ArrayViewCid;
388 kTypedDataInt8ArrayViewCid);
390 kExternalTypedDataInt8ArrayCid);
392 kUnmodifiableTypedDataInt8ArrayViewCid);
396 kTypedDataUint8ArrayCid);
398 kTypedDataUint8ClampedArrayCid);
400 kTypedDataInt16ArrayCid);
402 kTypedDataUint16ArrayCid);
404 kTypedDataInt32ArrayCid);
406 kTypedDataUint32ArrayCid);
408 kTypedDataInt64ArrayCid);
410 kTypedDataUint64ArrayCid);
412 kTypedDataFloat32ArrayCid);
414 kTypedDataFloat64ArrayCid);
416 kTypedDataFloat32x4ArrayCid);
418 kTypedDataInt32x4ArrayCid);
420 kTypedDataFloat64x2ArrayCid);
441 return is_byte_data_view ||
455 return is_byte_data_view ||
463 const intptr_t internal_cid =
467 return internal_cid == kTypedDataUint8ClampedArrayCid;
487 return IsStringClassId(predefined_cid) || predefined_cid == kNumberCid ||
488 predefined_cid == kIntegerCid || predefined_cid == kSmiCid ||
489 predefined_cid == kMintCid || predefined_cid ==
kNeverCid ||
490 predefined_cid == kSentinelCid || predefined_cid == kStackTraceCid ||
491 predefined_cid == kDoubleCid || predefined_cid == kFloat32x4Cid ||
492 predefined_cid == kFloat64x2Cid || predefined_cid == kInt32x4Cid ||
493 predefined_cid == kSendPortCid || predefined_cid == kCapabilityCid ||
494 predefined_cid == kRegExpCid || predefined_cid == kBoolCid ||
495 predefined_cid ==
kNullCid || predefined_cid == kPointerCid ||
496 predefined_cid == kTypeCid || predefined_cid == kRecordTypeCid ||
497 predefined_cid == kFunctionTypeCid;
516 case kFfiNativeFunctionCid:
517#define CASE_FFI_CID(name) case kFfi##name##Cid:
530 case kDynamicLibraryCid:
531#define CASE_FFI_CID(name) case kFfi##name##Cid:
542 return index == kPointerCid;
546 return index == kDynamicLibraryCid;
#define DEFINE_OBJECT_KIND(clazz)
#define CASE_FFI_CID(name)
#define CLASS_LIST_FFI(V)
#define CLASS_LIST_FFI_TYPE_MARKER(V)
#define CLASS_LIST_TYPED_DATA(V)
const int kNumTypedDataCidRemainders
static const ClassId kLastTypedDataCid
bool IsTypedDataViewClassId(intptr_t index)
bool IsTypedDataClassId(intptr_t index)
bool IsFfiPredefinedClassId(classid_t class_id)
bool IsOneByteStringClassId(intptr_t index)
bool IsFfiDynamicLibraryClassId(intptr_t index)
bool IsShallowlyImmutableCid(intptr_t predefined_cid)
bool IsConcreteTypeClassId(intptr_t index)
const int kTypedDataCidRemainderUnmodifiable
bool IsTypedDataBaseClassId(intptr_t index)
bool IsImplicitFieldClassId(intptr_t index)
bool IsNumberClassId(intptr_t index)
bool IsTypeClassId(intptr_t index)
const int kTypedDataCidRemainderInternal
bool IsArrayClassId(intptr_t index)
static const ClassId kLastErrorCid
bool IsErrorClassId(intptr_t index)
bool IsUnmodifiableTypedDataViewClassId(intptr_t index)
@ kUnmodifiableByteDataViewCid
bool IsFfiTypeClassId(intptr_t index)
static const ClassId kFirstErrorCid
bool IsClampedTypedDataBaseClassId(intptr_t index)
const int kTypedDataCidRemainderExternal
static const ClassId kFirstTypedDataCid
const int kTypedDataCidRemainderView
bool IsExternalPayloadClassId(classid_t cid)
bool ShouldHaveImmutabilityBitSetCid(intptr_t predefined_cid)
constexpr intptr_t kFirstInternalOnlyCid
bool IsInternalVMdefinedClassId(intptr_t index)
bool IsFfiPointerClassId(intptr_t index)
bool IsIntegerClassId(intptr_t index)
bool IsInternalOnlyClassId(intptr_t index)
bool IsDeeplyImmutableCid(intptr_t predefined_cid)
bool IsBuiltinListClassId(intptr_t index)
static constexpr intptr_t kClassIdTagMax
bool IsExternalTypedDataClassId(intptr_t index)
COMPILE_ASSERT(kUnreachableReference==WeakTable::kNoValue)
constexpr intptr_t kLastInternalOnlyCid
bool IsStringClassId(intptr_t index)