Flutter Engine
The Flutter Engine
Namespaces | Macros | Typedefs | Enumerations | Functions | Variables
class_id.h File Reference
#include "platform/assert.h"
#include "vm/globals.h"

Go to the source code of this file.

Namespaces

namespace  dart
 

Macros

#define CLASS_LIST_INTERNAL_ONLY(V)
 
#define CLASS_LIST_INSTANCE_SINGLETONS(V)
 
#define CLASS_LIST_NO_OBJECT_NOR_STRING_NOR_ARRAY_NOR_MAP(V)    CLASS_LIST_INTERNAL_ONLY(V) CLASS_LIST_INSTANCE_SINGLETONS(V)
 
#define CLASS_LIST_MAPS(V)
 
#define CLASS_LIST_SETS(V)
 
#define CLASS_LIST_FIXED_LENGTH_ARRAYS(V)
 
#define CLASS_LIST_ARRAYS(V)
 
#define CLASS_LIST_STRINGS(V)
 
#define CLASS_LIST_TYPED_DATA(V)
 
#define CLASS_LIST_FFI_NUMERIC_FIXED_SIZE(V)
 
#define CLASS_LIST_FFI_TYPE_MARKER(V)
 
#define CLASS_LIST_FFI(V)
 
#define DART_CLASS_LIST_TYPED_DATA(V)
 
#define CLASS_LIST_FOR_HANDLES(V)
 
#define CLASS_LIST_NO_OBJECT(V)
 
#define CLASS_LIST(V)
 
#define DEFINE_OBJECT_KIND(clazz)   k##clazz##Cid,
 
#define DEFINE_OBJECT_KIND(clazz)   kFfi##clazz##Cid,
 
#define DEFINE_OBJECT_KIND(clazz)
 
#define CASE_FFI_CID(name)   case kFfi##name##Cid:
 
#define CASE_FFI_CID(name)   case kFfi##name##Cid:
 

Typedefs

typedef int32_t dart::ClassIdTagType
 

Enumerations

enum  dart::ClassId : intptr_t {
  dart::kIllegalCid = 0 , dart::kNativePointer , dart::kFreeListElement , dart::kForwardingCorpse ,
  dart::kByteDataViewCid , dart::kUnmodifiableByteDataViewCid , dart::kByteBufferCid , dart::kNullCid ,
  dart::kDynamicCid , dart::kVoidCid , dart::kNeverCid , dart::kNumPredefinedCids
}
 

Functions

bool dart::IsInternalOnlyClassId (intptr_t index)
 
bool dart::IsErrorClassId (intptr_t index)
 
bool dart::IsNumberClassId (intptr_t index)
 
bool dart::IsIntegerClassId (intptr_t index)
 
bool dart::IsStringClassId (intptr_t index)
 
bool dart::IsOneByteStringClassId (intptr_t index)
 
bool dart::IsBuiltinListClassId (intptr_t index)
 
bool dart::IsTypeClassId (intptr_t index)
 
bool dart::IsTypedDataBaseClassId (intptr_t index)
 
bool dart::IsTypedDataClassId (intptr_t index)
 
bool dart::IsTypedDataViewClassId (intptr_t index)
 
bool dart::IsExternalTypedDataClassId (intptr_t index)
 
bool dart::IsFfiPointerClassId (intptr_t index)
 
bool dart::IsFfiTypeClassId (intptr_t index)
 
bool dart::IsFfiDynamicLibraryClassId (intptr_t index)
 
bool dart::IsInternalVMdefinedClassId (intptr_t index)
 
bool dart::IsImplicitFieldClassId (intptr_t index)
 
 dart::COMPILE_ASSERT (kFirstInternalOnlyCid==kObjectCid+1)
 
 dart::COMPILE_ASSERT (kInstanceCid==kLastInternalOnlyCid+1)
 
 dart::COMPILE_ASSERT (kFirstErrorCid==kErrorCid &&kApiErrorCid==kFirstErrorCid+1 &&kLanguageErrorCid==kFirstErrorCid+2 &&kUnhandledExceptionCid==kFirstErrorCid+3 &&kUnwindErrorCid==kFirstErrorCid+4 &&kLastErrorCid==kUnwindErrorCid &&kLastInternalOnlyCid==kLastErrorCid)
 
bool dart::IsConcreteTypeClassId (intptr_t index)
 
 dart::COMPILE_ASSERT (kOneByteStringCid==kStringCid+1 &&kTwoByteStringCid==kStringCid+2)
 
bool dart::IsArrayClassId (intptr_t index)
 
 dart::COMPILE_ASSERT (kTypedDataCidRemainderInternal==0)
 
 dart::COMPILE_ASSERT (kTypedDataInt8ArrayCid+kTypedDataCidRemainderView==kTypedDataInt8ArrayViewCid)
 
 dart::COMPILE_ASSERT (kFirstTypedDataCid==kTypedDataInt8ArrayCid)
 
 dart::COMPILE_ASSERT (kFirstTypedDataCid+1 *kNumTypedDataCidRemainders==kTypedDataUint8ArrayCid)
 
 dart::COMPILE_ASSERT (kFirstTypedDataCid+2 *kNumTypedDataCidRemainders==kTypedDataUint8ClampedArrayCid)
 
 dart::COMPILE_ASSERT (kFirstTypedDataCid+3 *kNumTypedDataCidRemainders==kTypedDataInt16ArrayCid)
 
 dart::COMPILE_ASSERT (kFirstTypedDataCid+4 *kNumTypedDataCidRemainders==kTypedDataUint16ArrayCid)
 
 dart::COMPILE_ASSERT (kFirstTypedDataCid+5 *kNumTypedDataCidRemainders==kTypedDataInt32ArrayCid)
 
 dart::COMPILE_ASSERT (kFirstTypedDataCid+6 *kNumTypedDataCidRemainders==kTypedDataUint32ArrayCid)
 
 dart::COMPILE_ASSERT (kFirstTypedDataCid+7 *kNumTypedDataCidRemainders==kTypedDataInt64ArrayCid)
 
 dart::COMPILE_ASSERT (kFirstTypedDataCid+8 *kNumTypedDataCidRemainders==kTypedDataUint64ArrayCid)
 
 dart::COMPILE_ASSERT (kFirstTypedDataCid+9 *kNumTypedDataCidRemainders==kTypedDataFloat32ArrayCid)
 
 dart::COMPILE_ASSERT (kFirstTypedDataCid+10 *kNumTypedDataCidRemainders==kTypedDataFloat64ArrayCid)
 
 dart::COMPILE_ASSERT (kFirstTypedDataCid+11 *kNumTypedDataCidRemainders==kTypedDataFloat32x4ArrayCid)
 
 dart::COMPILE_ASSERT (kFirstTypedDataCid+12 *kNumTypedDataCidRemainders==kTypedDataInt32x4ArrayCid)
 
 dart::COMPILE_ASSERT (kFirstTypedDataCid+13 *kNumTypedDataCidRemainders==kTypedDataFloat64x2ArrayCid)
 
 dart::COMPILE_ASSERT (kFirstTypedDataCid+13 *kNumTypedDataCidRemainders+kTypedDataCidRemainderUnmodifiable==kLastTypedDataCid)
 
 dart::COMPILE_ASSERT (kFfiStructCid+1==kFirstTypedDataCid)
 
 dart::COMPILE_ASSERT (kLastTypedDataCid+1==kByteDataViewCid)
 
bool dart::IsUnmodifiableTypedDataViewClassId (intptr_t index)
 
bool dart::IsClampedTypedDataBaseClassId (intptr_t index)
 
bool dart::IsExternalPayloadClassId (classid_t cid)
 
bool dart::IsDeeplyImmutableCid (intptr_t predefined_cid)
 
bool dart::IsShallowlyImmutableCid (intptr_t predefined_cid)
 
bool dart::ShouldHaveImmutabilityBitSetCid (intptr_t predefined_cid)
 
bool dart::IsFfiPredefinedClassId (classid_t class_id)
 
 dart::COMPILE_ASSERT (kByteBufferCid+1==kNullCid)
 

Variables

static constexpr intptr_t dart::kClassIdTagMax = (1 << 20) - 1
 
const int dart::kTypedDataCidRemainderInternal = 0
 
const int dart::kTypedDataCidRemainderView = 1
 
const int dart::kTypedDataCidRemainderExternal = 2
 
const int dart::kTypedDataCidRemainderUnmodifiable = 3
 
const int dart::kNumTypedDataCidRemainders = kTypedDataCidRemainderUnmodifiable + 1
 
constexpr intptr_t dart::kFirstInternalOnlyCid = kClassCid
 
constexpr intptr_t dart::kLastInternalOnlyCid = kUnwindErrorCid
 
static const ClassId dart::kFirstErrorCid = kErrorCid
 
static const ClassId dart::kLastErrorCid = kUnwindErrorCid
 
static const ClassId dart::kFirstTypedDataCid = kTypedDataInt8ArrayCid
 
static const ClassId dart::kLastTypedDataCid
 

Macro Definition Documentation

◆ CASE_FFI_CID [1/2]

#define CASE_FFI_CID (   name)    case kFfi##name##Cid:

◆ CASE_FFI_CID [2/2]

#define CASE_FFI_CID (   name)    case kFfi##name##Cid:

◆ CLASS_LIST

#define CLASS_LIST (   V)
Value:
V(Object) \
CLASS_LIST_NO_OBJECT(V)
T __attribute__((ext_vector_type(N))) V
#define V(name)
Definition: raw_object.h:125

Definition at line 208 of file class_id.h.

◆ CLASS_LIST_ARRAYS

#define CLASS_LIST_ARRAYS (   V)
Value:
V(GrowableObjectArray)
#define CLASS_LIST_FIXED_LENGTH_ARRAYS(V)
Definition: class_id.h:124

Definition at line 128 of file class_id.h.

◆ CLASS_LIST_FFI

#define CLASS_LIST_FFI (   V)
Value:
CLASS_LIST_FFI_TYPE_MARKER(V) \
V(NativeType) \
V(Struct)
void(* NativeFunction)(NativeArguments *arguments)

Definition at line 171 of file class_id.h.

◆ CLASS_LIST_FFI_NUMERIC_FIXED_SIZE

#define CLASS_LIST_FFI_NUMERIC_FIXED_SIZE (   V)
Value:
V(Int8) \
V(Int16) \
V(Int32) \
V(Int64) \
V(Uint8) \
V(Uint16) \
V(Uint32) \
V(Uint64) \
V(Float) \
V(Double)

Definition at line 153 of file class_id.h.

◆ CLASS_LIST_FFI_TYPE_MARKER

#define CLASS_LIST_FFI_TYPE_MARKER (   V)
Value:
V(Void) \
V(Handle) \
V(Bool)
#define CLASS_LIST_FFI_NUMERIC_FIXED_SIZE(V)
Definition: class_id.h:153

Definition at line 165 of file class_id.h.

◆ CLASS_LIST_FIXED_LENGTH_ARRAYS

#define CLASS_LIST_FIXED_LENGTH_ARRAYS (   V)
Value:
V(Array) \
V(ImmutableArray)

Definition at line 124 of file class_id.h.

◆ CLASS_LIST_FOR_HANDLES

#define CLASS_LIST_FOR_HANDLES (   V)
Value:
V(Map) \
V(Set) \
V(Array) \
V(GrowableObjectArray) \
V(String)
#define CLASS_LIST_NO_OBJECT_NOR_STRING_NOR_ARRAY_NOR_MAP(V)
Definition: class_id.h:113

Definition at line 193 of file class_id.h.

◆ CLASS_LIST_INSTANCE_SINGLETONS

#define CLASS_LIST_INSTANCE_SINGLETONS (   V)

Definition at line 70 of file class_id.h.

◆ CLASS_LIST_INTERNAL_ONLY

#define CLASS_LIST_INTERNAL_ONLY (   V)

Definition at line 26 of file class_id.h.

◆ CLASS_LIST_MAPS

#define CLASS_LIST_MAPS (   V)
Value:
V(Map) \
V(ConstMap)

Definition at line 116 of file class_id.h.

◆ CLASS_LIST_NO_OBJECT

#define CLASS_LIST_NO_OBJECT (   V)
Value:
CLASS_LIST_MAPS(V) \
CLASS_LIST_SETS(V) \
CLASS_LIST_ARRAYS(V) \
CLASS_LIST_STRINGS(V)

Definition at line 201 of file class_id.h.

◆ CLASS_LIST_NO_OBJECT_NOR_STRING_NOR_ARRAY_NOR_MAP

#define CLASS_LIST_NO_OBJECT_NOR_STRING_NOR_ARRAY_NOR_MAP (   V)     CLASS_LIST_INTERNAL_ONLY(V) CLASS_LIST_INSTANCE_SINGLETONS(V)

Definition at line 113 of file class_id.h.

◆ CLASS_LIST_SETS

#define CLASS_LIST_SETS (   V)
Value:
V(Set) \
V(ConstSet)

Definition at line 120 of file class_id.h.

◆ CLASS_LIST_STRINGS

#define CLASS_LIST_STRINGS (   V)
Value:
V(String) \
V(OneByteString) \
V(TwoByteString)

Definition at line 132 of file class_id.h.

◆ CLASS_LIST_TYPED_DATA

#define CLASS_LIST_TYPED_DATA (   V)
Value:
V(Int8Array) \
V(Uint8ClampedArray) \
V(Int16Array) \
V(Int32Array) \
V(Int64Array) \
V(Uint64Array) \
V(Float64Array) \
V(Float32x4Array) \
V(Int32x4Array) \
V(Float64x2Array)
emscripten::val Uint32Array
Definition: WasmCommon.h:34
emscripten::val Uint16Array
Definition: WasmCommon.h:33
emscripten::val Float32Array
Definition: WasmCommon.h:35
emscripten::val Uint8Array
Definition: WasmCommon.h:32

Definition at line 137 of file class_id.h.

◆ DART_CLASS_LIST_TYPED_DATA

#define DART_CLASS_LIST_TYPED_DATA (   V)
Value:
V(Int8) \
V(Uint8) \
V(Uint8Clamped) \
V(Int16) \
V(Uint16) \
V(Int32) \
V(Uint32) \
V(Int64) \
V(Uint64) \
V(Float32) \
V(Float64) \
V(Float32x4) \
V(Int32x4) \
V(Float64x2)

Definition at line 177 of file class_id.h.

◆ DEFINE_OBJECT_KIND [1/3]

#define DEFINE_OBJECT_KIND (   clazz)    k##clazz##Cid,

Definition at line 237 of file class_id.h.

◆ DEFINE_OBJECT_KIND [2/3]

#define DEFINE_OBJECT_KIND (   clazz)    kFfi##clazz##Cid,

Definition at line 237 of file class_id.h.

◆ DEFINE_OBJECT_KIND [3/3]

#define DEFINE_OBJECT_KIND (   clazz)
Value:
kTypedData##clazz##Cid, \
kTypedData##clazz##ViewCid, \
kExternalTypedData##clazz##Cid, \
kUnmodifiableTypedData##clazz##ViewCid,

Definition at line 237 of file class_id.h.