scoop:scoop.core:0.1.0
src/type_info_shapes.scoop
Selected production source · src/type_info_shapes.scoop
1
/**2
* The structural category of a concrete type and its category-specific declaration metadata.3
*/4
public enum TypeShape {5
/**6
* Describes the Struct category of concrete type metadata.7
*/8
Struct(StructInfo),9
/**10
* Describes the Enum category of concrete type metadata.11
*/12
Enum(EnumInfo),13
/**14
* Describes the IntegerEnum category of concrete type metadata.15
*/16
IntegerEnum(IntegerEnumInfo),17
/**18
* Describes the Class category of concrete type metadata.19
*/20
Class(ClassInfo),21
/**22
* Describes the Object category of concrete type metadata.23
*/24
Object(ObjectInfo),25
/**26
* Describes the Interface category of concrete type metadata.27
*/28
Interface(InterfaceInfo),29
/**30
* Describes the Tuple category of concrete type metadata.31
*/32
Tuple(TupleInfo),33
/**34
* Describes the Unit category of concrete type metadata.35
*/36
Unit,37
/**38
* Describes the Intrinsic category of concrete type metadata.39
*/40
Intrinsic(IntrinsicInfo),41
/**42
* Describes the Function category of concrete type metadata.43
*/44
Function(FunctionTypeInfo),45
/**46
* Describes the Pointer category of concrete type metadata.47
*/48
Pointer(PointerTypeInfo)49
}51
/**52
* Stored value fields, constructors, and implemented interface type uses of a struct.53
*/54
public struct StructInfo(55
val fields: Array<FieldInfo>,56
val constructors: Array<ConstructorInfo>,57
val interfaces: Array<TypeUseInfo>58
)60
/**61
* Payload variants and implemented interface type uses of an enum.62
*/63
public struct EnumInfo(val variants: Array<VariantInfo>, val interfaces: Array<TypeUseInfo>)65
/**66
* The underlying integer type, declared values, and interfaces of an integer-backed enum.67
*/68
public struct IntegerEnumInfo(69
val underlyingType: TypeRef,70
val variants: Array<IntegerEnumVariantInfo>,71
val interfaces: Array<TypeUseInfo>72
)74
/**75
* A declared integer-enum variant retaining its identity, annotations, order, and exact integer76
* value.77
*/78
public struct IntegerEnumVariantInfo(79
val id: VariantRef,80
val owner: TypeRef,81
val name: String,82
val annotations: Array<AnnotationInfo>,83
val index: Long,84
val value: IntegerValue85
)87
/**88
* A class's base type, interfaces, declared properties, physical storage, constructors, and89
* finality.90
*/91
public struct ClassInfo(92
val base: Option<TypeUseInfo>,93
val interfaces: Array<TypeUseInfo>,94
val properties: Array<PropertyInfo>,95
val storage: Array<FieldInfo>,96
val constructors: Array<ConstructorInfo>,97
val isFinal: Boolean98
)100
/**101
* A singleton's base, interfaces, properties, storage, and optional companion host identity.102
*/103
public struct ObjectInfo(104
val base: Option<TypeUseInfo>,105
val interfaces: Array<TypeUseInfo>,106
val properties: Array<PropertyInfo>,107
val storage: Array<FieldInfo>,108
val companionHost: Option<NominalRef>109
)111
/**112
* An interface's parent interfaces and declared properties.113
*/114
public struct InterfaceInfo(val parents: Array<TypeUseInfo>, val properties: Array<PropertyInfo>)116
/**117
* The ordered, annotated element types of a tuple.118
*/119
public struct TupleInfo(val elements: Array<TupleElementInfo>)121
/**122
* The compiler-defined representation category of an intrinsic type.123
*/124
public enum IntrinsicKind {125
/**126
* Logical values.127
*/128
Boolean,129
/**130
* A fixed-width integer, with signedness and bit width.131
*/132
Integer(Boolean, Long),133
/**134
* IEEE binary32.135
*/136
Float,137
/**138
* IEEE binary64.139
*/140
Double,141
/**142
* Unicode scalar values.143
*/144
Char,145
/**146
* Immutable UTF-8 text.147
*/148
String,149
/**150
* Fixed-size immutable element storage.151
*/152
Array,153
/**154
* Fixed-size mutable element storage.155
*/156
MutableArray,157
/**158
* The common reference root.159
*/160
Any,161
/**162
* The uninhabited type.163
*/164
Nothing,165
/**166
* The inheritable exception prefix with a private stack snapshot.167
*/168
Throwable,169
/**170
* Possibly uninitialized value storage.171
*/172
MaybeUninit,173
/**174
* One of the fixed atomic representation categories.175
*/176
Atomic(AtomicTypeKind)177
}179
/**180
* Distinguishes fixed integer, Boolean, and managed-reference atomic representations.181
*/182
public enum AtomicTypeKind {183
/**184
* An atomic Int cell.185
*/186
Int,187
/**188
* An atomic Long cell.189
*/190
Long,191
/**192
* An atomic Boolean cell.193
*/194
Boolean,195
/**196
* An atomic managed-reference cell using identity comparisons.197
*/198
Reference199
}201
/**202
* The representation category of a compiler-defined type.203
*/204
public struct IntrinsicInfo(val kind: IntrinsicKind)206
/**207
* A concrete function type, including suspend effect, optional receiver, ordered parameters, and208
* result type use.209
*/210
public struct FunctionTypeInfo(211
val isSuspend: Boolean,212
val receiver: Option<TypeUseInfo>,213
val parameters: Array<TypeUseInfo>,214
val result: TypeUseInfo215
)217
/**218
* Distinguishes native data pointers from native function pointers.219
*/220
public enum PointerTypeInfo {221
/**222
* A native data pointer with its annotated pointee type.223
*/224
Ptr(TypeUseInfo),225
/**226
* A native function pointer with its complete function signature.227
*/228
FunPtr(FunctionTypeInfo),229
/**230
* A native function pointer with its complete function signature and GC-leaf call mode.231
*/232
GCLeafFunPtr(FunctionTypeInfo)233
}