Documentation ¶
Index ¶
- Constants
- Variables
- type ATRecordType
- type AccessibleFunctionCacheEntry
- type AccessibleFunctionFlags
- type AccessibleFunctionsSection
- type AccessibleFunctionsState
- type Anonymous
- type AnonymousContextDescriptorFlags
- type AssociatedType
- type AssociatedTypeDescriptor
- type AssociatedTypeRecord
- type AutomaticDynamicReplacementEntry
- type AutomaticDynamicReplacements
- type AutomaticDynamicReplacementsSome
- type BuiltinType
- type BuiltinTypeDescriptor
- type Capture
- type CaptureDescriptor
- type CaptureType
- type CaptureTypeRecord
- type Class
- type ClassFlags
- type ConformanceDescriptor
- type ConformanceFlags
- func (f ConformanceFlags) GetNumConditionalRequirements() int
- func (f ConformanceFlags) GetTypeReferenceKind() TypeReferenceKind
- func (f ConformanceFlags) HasGenericWitnessTable() bool
- func (f ConformanceFlags) HasResilientWitnesses() bool
- func (f ConformanceFlags) IsRetroactive() bool
- func (f ConformanceFlags) IsSynthesizedNonUnique() bool
- func (f ConformanceFlags) NumConditionalPackShapeDescriptors() int
- func (f ConformanceFlags) String() string
- type ContextDescriptorFlags
- func (f ContextDescriptorFlags) IsGeneric() bool
- func (f ContextDescriptorFlags) IsUnique() bool
- func (f ContextDescriptorFlags) Kind() ContextDescriptorKind
- func (f ContextDescriptorFlags) KindSpecific() TypeContextDescriptorFlags
- func (f ContextDescriptorFlags) String() string
- func (f ContextDescriptorFlags) Version() uint8
- type ContextDescriptorKind
- type DynamicReplacementChainEntry
- type DynamicReplacementDescriptor
- type DynamicReplacementKey
- type DynamicReplacementScope
- type DynamicReplacementSomeDescriptor
- type Enum
- type ExtendedExistentialTypeShapeFlags
- func (f ExtendedExistentialTypeShapeFlags) GetSpecialKind() SpecialKind
- func (f ExtendedExistentialTypeShapeFlags) HasGeneralizationSignature() bool
- func (f ExtendedExistentialTypeShapeFlags) HasImplicitGenSigParams() bool
- func (f ExtendedExistentialTypeShapeFlags) HasImplicitReqSigParams() bool
- func (f ExtendedExistentialTypeShapeFlags) HasSuggestedValueWitnesses() bool
- func (f ExtendedExistentialTypeShapeFlags) HasTypeExpression() bool
- func (f ExtendedExistentialTypeShapeFlags) HasTypePacks() bool
- func (f ExtendedExistentialTypeShapeFlags) IsClassConstrained() bool
- func (f ExtendedExistentialTypeShapeFlags) IsMetatypeConstrained() bool
- func (f ExtendedExistentialTypeShapeFlags) IsOpaque() bool
- func (f ExtendedExistentialTypeShapeFlags) String() string
- type Extension
- type ExtraClassDescriptorFlags
- type Field
- type FieldDescriptor
- type FieldDescriptorKind
- type FieldRecord
- type FieldRecordDescriptor
- type FieldRecordFlags
- type GenericContext
- type GenericContextDescriptorFlags
- type GenericEnvironmentFlags
- type GenericMetadataPattern
- type GenericMetadataPatternFlags
- func (f GenericMetadataPatternFlags) HasClassImmediateMembersPattern() bool
- func (f GenericMetadataPatternFlags) HasExtraDataPattern() bool
- func (f GenericMetadataPatternFlags) HasTrailingFlags() bool
- func (f GenericMetadataPatternFlags) MetadataKind() MetadataKind
- func (f GenericMetadataPatternFlags) String() string
- type GenericPackKind
- type GenericPackShapeDescriptor
- type GenericPackShapeHeader
- type GenericParamDescriptor
- type GenericParamKind
- type GenericRequirementFlags
- type GenericRequirementKind
- type GenericRequirementLayoutKind
- type MDKind
- type Metadata
- type MetadataInitializationKind
- type MetadataKind
- type MetadataSource
- type MetadataSourceRecord
- type Method
- type MethodDescriptorFlags
- func (f MethodDescriptorFlags) ExtraDiscriminator() uint16
- func (f MethodDescriptorFlags) IsAsync() bool
- func (f MethodDescriptorFlags) IsDynamic() bool
- func (f MethodDescriptorFlags) IsInstance() bool
- func (f MethodDescriptorFlags) Kind() MDKind
- func (f MethodDescriptorFlags) String() string
- func (f MethodDescriptorFlags) Verbose() string
- type MultiPayloadEnum
- type MultiPayloadEnumDescriptor
- type MultiPayloadEnumPayloadSpareBitMaskByteCount
- type MultiPayloadEnumSizeAndFlags
- type NecessaryBindings
- type NecessaryBindingsKind
- type OpaqueType
- type PCDWitnessTable
- type Protocol
- type ProtocolContextDescriptorFlags
- type ProtocolRequirementFlags
- func (f ProtocolRequirementFlags) ExtraDiscriminator() uint16
- func (f ProtocolRequirementFlags) IsAsync() bool
- func (f ProtocolRequirementFlags) IsFunctionImpl() bool
- func (f ProtocolRequirementFlags) IsInstance() bool
- func (f ProtocolRequirementFlags) IsSignedWithAddress() bool
- func (f ProtocolRequirementFlags) Kind() ProtocolRequirementKind
- func (f ProtocolRequirementFlags) String() string
- func (f ProtocolRequirementFlags) Verbose() string
- type ProtocolRequirementKind
- type RelativeDirectPointer
- type RelativeIndirectablePointer
- type RelativeString
- type RelativeTargetProtocolDescriptorPointer
- func (r RelativeTargetProtocolDescriptorPointer) GetAddress(readPtr func(uint64) (uint64, error)) (uint64, error)
- func (r RelativeTargetProtocolDescriptorPointer) GetRelPtrAddress() uint64
- func (r RelativeTargetProtocolDescriptorPointer) IsObjC() bool
- func (r RelativeTargetProtocolDescriptorPointer) IsSet() bool
- func (r RelativeTargetProtocolDescriptorPointer) String() string
- type ResilientSuperclass
- type ResilientWitnesses
- type SpecialKind
- type SpecialPointerAuthDiscriminators
- type SpecialProtocol
- type Struct
- type TOC
- type TargetAccessibleFunctionRecord
- type TargetAnonymousContextDescriptor
- type TargetCanonicalSpecializedMetadataAccessorsListEntry
- type TargetCanonicalSpecializedMetadatasCachingOnceToken
- type TargetCanonicalSpecializedMetadatasListCount
- type TargetCanonicalSpecializedMetadatasListEntry
- type TargetClassDescriptor
- type TargetContextDescriptor
- type TargetEnumDescriptor
- func (e TargetEnumDescriptor) GetNumCases() uint32
- func (e TargetEnumDescriptor) GetNumPayloadCases() uint32
- func (e TargetEnumDescriptor) GetPayloadSizeOffset() uint32
- func (e *TargetEnumDescriptor) Read(r io.Reader, addr uint64) error
- func (e TargetEnumDescriptor) Size() int64
- func (e TargetEnumDescriptor) String() string
- type TargetEnumValueWitnessTable
- type TargetExtendedExistentialTypeShape
- type TargetExtensionContextDescriptor
- type TargetForeignMetadataInitialization
- type TargetGenericClassMetadataPattern
- type TargetGenericContextDescriptorHeader
- type TargetGenericEnvironment
- type TargetGenericMetadataInstantiationCache
- type TargetGenericMetadataPartialPattern
- type TargetGenericMetadataPattern
- type TargetGenericRequirement
- type TargetGenericRequirementDescriptor
- type TargetGenericValueMetadataPattern
- type TargetGenericWitnessTable
- type TargetMangledContextName
- type TargetMetadata
- type TargetMethodDescriptor
- type TargetMethodOverrideDescriptor
- type TargetModuleContext
- type TargetModuleContextDescriptor
- type TargetNonUniqueExtendedExistentialTypeShape
- type TargetObjCResilientClassStubInfo
- type TargetOpaqueTypeDescriptor
- type TargetOverrideTableHeader
- type TargetProtocolConformanceDescriptor
- type TargetProtocolDescriptor
- type TargetProtocolRecord
- type TargetProtocolRequirement
- type TargetRelativeDirectPointer
- type TargetResilientClassMetadataPattern
- type TargetResilientSuperclass
- type TargetResilientWitness
- type TargetResilientWitnessesHeader
- type TargetSingletonMetadataInitialization
- type TargetStructDescriptor
- type TargetTypeContextDescriptor
- type TargetTypeGenericContextDescriptorHeader
- type TargetTypeMetadataHeader
- type TargetVTableDescriptorHeader
- type TargetValueMetadata
- type TargetValueTypeDescriptor
- type TargetValueWitnessFlags
- type TargetValueWitnessTable
- func (t *TargetValueWitnessTable) Fixup(fix func(uint64) uint64)
- func (t TargetValueWitnessTable) Flags() string
- func (t TargetValueWitnessTable) GetAlignment() uint32
- func (t TargetValueWitnessTable) HasEnumWitnesses() bool
- func (t TargetValueWitnessTable) IsBitwiseTakable() bool
- func (t TargetValueWitnessTable) IsCopyable() bool
- func (t TargetValueWitnessTable) IsIncomplete() bool
- func (t TargetValueWitnessTable) IsInlineStorage() bool
- func (t TargetValueWitnessTable) IsPOD() bool
- func (t TargetValueWitnessTable) IsValueInline() bool
- type TargetWitnessTable
- type Type
- type TypeContextDescriptorFlags
- func (f TypeContextDescriptorFlags) AreImmediateMembersNegative() bool
- func (f TypeContextDescriptorFlags) HasCanonicalMetadataPrespecializations() bool
- func (f TypeContextDescriptorFlags) HasImportInfo() bool
- func (f TypeContextDescriptorFlags) HasLayoutString() bool
- func (f TypeContextDescriptorFlags) HasOverrideTable() bool
- func (f TypeContextDescriptorFlags) HasResilientSuperclass() bool
- func (f TypeContextDescriptorFlags) HasVTable() bool
- func (f TypeContextDescriptorFlags) IsActor() bool
- func (f TypeContextDescriptorFlags) IsDefaultActor() bool
- func (f TypeContextDescriptorFlags) MetadataInitialization() MetadataInitializationKind
- func (f TypeContextDescriptorFlags) ResilientSuperclassReferenceKind() TypeReferenceKind
- func (f TypeContextDescriptorFlags) String() string
- type TypeGenericContext
- type TypeReferenceKind
- type VTable
- type ValueWitnessTable
Constants ¶
const ( // Non-type metadata kinds have this bit set. MetadataKindIsNonType = 0x400 // Non-heap metadata kinds have this bit set. MetadataKindIsNonHeap = 0x200 // The above two flags are negative because the "class" kind has to be zero, // and class metadata is both type and heap metadata. // Runtime-private metadata has this bit set. The compiler must not statically // generate metadata objects with these kinds, and external tools should not // rely on the stability of these values or the precise binary layout of // their associated data structures. MetadataKindIsRuntimePrivate = 0x100 )
const ( /// Does this pattern have an extra-data pattern? HasExtraDataPattern = 0 /// Do instances of this pattern have a bitset of flags that occur at the /// end of the metadata, after the extra data if there is any? HasTrailingFlags = 1 /// Does this pattern have an immediate-members pattern? Class_HasImmediateMembersPattern = 31 /// For value metadata: the metadata kind of the type. Value_MetadataKind = 21 Value_MetadataKind_width = 11 )
const ( /// Whether this protocol is class-constrained. HasClassConstraint = 0 HasClassConstraint_width = 1 /// Whether this protocol is resilient. IsResilient = 1 /// Special protocol value. SpecialProtocolKind = 2 SpecialProtocolKind_width = 6 )
const ( // Bit used to indicate that an associated type witness is a pointer to a mangled name (vs. a pointer to metadata). AssociatedTypeMangledNameBit uint32 = 0x01 // Prefix byte used to identify an associated type whose mangled name is relative to the protocol's context rather than the conforming type's context. AssociatedTypeInProtocolContextByte uint8 = 0xFF )
const ( /// The name of the standard library, which is a reserved module name. STDLIB_NAME = "Swift" /// The name of the Onone support library, which is a reserved module name. SWIFT_ONONE_SUPPORT = "SwiftOnoneSupport" /// The name of the SwiftShims module, which contains private stdlib decls. SWIFT_SHIMS_NAME = "SwiftShims" /// The name of the Builtin module, which contains Builtin functions. BUILTIN_NAME = "Builtin" /// The name of the clang imported header module. CLANG_HEADER_MODULE_NAME = "__ObjC" /// The prefix of module names used by LLDB to capture Swift expressions LLDB_EXPRESSIONS_MODULE_NAME_PREFIX = "__lldb_expr_" /// The name of the fake module used to hold imported Objective-C things. MANGLING_MODULE_OBJC = "__C" /// The name of the fake module used to hold synthesized ClangImporter things. MANGLING_MODULE_CLANG_IMPORTER = "__C_Synthesized" /// The name prefix for C++ template instantiation imported as a Swift struct. CXX_TEMPLATE_INST_PREFIX = "__CxxTemplateInst" SEMANTICS_PROGRAMTERMINATION_POINT = "programtermination_point" /// The name of the Builtin type prefix BUILTIN_TYPE_NAME_PREFIX = "Builtin." )
const ( /// The name of the Builtin type for Int BUILTIN_TYPE_NAME_INT = "Builtin.Int" /// The name of the Builtin type for Int8 BUILTIN_TYPE_NAME_INT8 = "Builtin.Int8" /// The name of the Builtin type for Int16 BUILTIN_TYPE_NAME_INT16 = "Builtin.Int16" /// The name of the Builtin type for Int32 BUILTIN_TYPE_NAME_INT32 = "Builtin.Int32" /// The name of the Builtin type for Int64 BUILTIN_TYPE_NAME_INT64 = "Builtin.Int64" /// The name of the Builtin type for Int128 BUILTIN_TYPE_NAME_INT128 = "Builtin.Int128" /// The name of the Builtin type for Int256 BUILTIN_TYPE_NAME_INT256 = "Builtin.Int256" /// The name of the Builtin type for Int512 BUILTIN_TYPE_NAME_INT512 = "Builtin.Int512" /// The name of the Builtin type for IntLiteral BUILTIN_TYPE_NAME_INTLITERAL = "Builtin.IntLiteral" /// The name of the Builtin type for IEEE Floating point types. BUILTIN_TYPE_NAME_FLOAT = "Builtin.FPIEEE" // The name of the builtin type for power pc specific floating point types. BUILTIN_TYPE_NAME_FLOAT_PPC = "Builtin.FPPPC" /// The name of the Builtin type for NativeObject BUILTIN_TYPE_NAME_NATIVEOBJECT = "Builtin.NativeObject" /// The name of the Builtin type for BridgeObject BUILTIN_TYPE_NAME_BRIDGEOBJECT = "Builtin.BridgeObject" /// The name of the Builtin type for RawPointer BUILTIN_TYPE_NAME_RAWPOINTER = "Builtin.RawPointer" /// The name of the Builtin type for UnsafeValueBuffer BUILTIN_TYPE_NAME_UNSAFEVALUEBUFFER = "Builtin.UnsafeValueBuffer" /// The name of the Builtin type for UnknownObject /// /// This no longer exists as an AST-accessible type, but it's still used for /// fields shaped like AnyObject when ObjC interop is enabled. BUILTIN_TYPE_NAME_UNKNOWNOBJECT = "Builtin.UnknownObject" /// The name of the Builtin type for Vector BUILTIN_TYPE_NAME_VEC = "Builtin.Vec" /// The name of the Builtin type for SILToken BUILTIN_TYPE_NAME_SILTOKEN = "Builtin.SILToken" /// The name of the Builtin type for Word BUILTIN_TYPE_NAME_WORD = "Builtin.Word" )
const ( KindMask = 0x0F // 16 kinds should be enough for anybody IsInstanceMask = 0x10 IsDynamicMask = 0x20 IsAsyncMask = 0x40 ExtraDiscriminatorShift = 16 ExtraDiscriminatorMask = 0xFFFF0000 )
const ( /// Whether there's something unusual about how the metadata is /// initialized. /// /// Meaningful for all type-descriptor kinds. MetadataInitialization = 0 MetadataInitialization_width = 2 /// Set if the type has extended import information. /// /// If true, a sequence of strings follow the null terminator in the /// descriptor, terminated by an empty string (i.e. by two null /// terminators in a row). See TypeImportInfo for the details of /// these strings and the order in which they appear. /// /// Meaningful for all type-descriptor kinds. HasImportInfo = 2 /// Set if the type descriptor has a pointer to a list of canonical /// prespecializations. HasCanonicalMetadataPrespecializations = 3 /// Set if the metadata contains a pointer to a layout string HasLayoutString = 4 /// Set if the class is an actor. /// /// Only meaningful for class descriptors. Class_IsActor = 7 /// Set if the class is a default actor class. Note that this is /// based on the best knowledge available to the class; actor /// classes with resilient superclassess might be default actors /// without knowing it. /// /// Only meaningful for class descriptors. Class_IsDefaultActor = 8 /// The kind of reference that this class makes to its resilient superclass /// descriptor. A TypeReferenceKind. /// /// Only meaningful for class descriptors. Class_ResilientSuperclassReferenceKind = 9 Class_ResilientSuperclassReferenceKind_width = 3 /// Whether the immediate class members in this metadata are allocated /// at negative offsets. For now, we don't use this. Class_AreImmediateMembersNegative = 12 /// Set if the context descriptor is for a class with resilient ancestry. /// /// Only meaningful for class descriptors. Class_HasResilientSuperclass = 13 /// Set if the context descriptor includes metadata for dynamically /// installing method overrides at metadata instantiation time. Class_HasOverrideTable = 14 /// Set if the context descriptor includes metadata for dynamically /// constructing a class's vtables at metadata instantiation time. /// /// Only meaningful for class descriptors. Class_HasVTable = 15 )
const ( SpecialKindMask = 0x000000FF SpecialKindShift = 0 HasGeneralizationSignature = 0x00000100 HasTypeExpression = 0x00000200 HasSuggestedValueWitnesses = 0x00000400 HasImplicitReqSigParams = 0x00000800 HasImplicitGenSigParams = 0x00001000 HasTypePacks = 0x00002000 )
const EnableChainingMask = 0x1
const ( // Whether this anonymous context descriptor is followed by its // mangled name, which can be used to match the descriptor at runtime. HasMangledName = 0 )
const ( // Set if the context descriptor includes a pointer to an Objective-C // resilient class stub structure. See the description of // TargetObjCResilientClassStubInfo in Metadata.h for details. // // Only meaningful for class descriptors when Objective-C interop is // enabled. HasObjCResilientClassStub = 0 )
const MaxNumExtraInhabitants = 0x7FFFFFFF
const SWIFT_REFLECTION_METADATA_VERSION = 3 // superclass field
Variables ¶
var MangledKnownTypeKind = map[string]string{
"A": "Swift.AutoreleasingUnsafeMutablePointer",
"a": "Swift.Array",
"B": "Swift.BinaryFloatingPoint",
"b": "Swift.Bool",
"c": "MangledKnownTypeKind2",
"D": "Swift.Dictionary",
"d": "Swift.Float64",
"E": "Swift.Encodable",
"e": "Swift.Decodable",
"F": "Swift.FloatingPoint",
"f": "Swift.Float32",
"G": "Swift.RandomNumberGenerator",
"H": "Swift.Hashable",
"h": "Swift.Set",
"I": "Swift.DefaultIndices",
"i": "Swift.Int",
"J": "Swift.Character",
"j": "Swift.Numeric",
"K": "Swift.BidirectionalCollection",
"k": "Swift.RandomAccessCollection",
"L": "Swift.Comparable",
"l": "Swift.Collection",
"M": "Swift.MutableCollection",
"m": "Swift.RangeReplaceableCollection",
"N": "Swift.ClosedRange",
"n": "Swift.Range",
"O": "Swift.ObjectIdentifier",
"P": "Swift.UnsafePointer",
"p": "Swift.UnsafeMutablePointer",
"Q": "Swift.Equatable",
"q": "Swift.Optional",
"R": "Swift.UnsafeBufferPointer",
"r": "Swift.UnsafeMutableBufferPointer",
"S": "Swift.String",
"s": "Swift.Substring",
"T": "Swift.Sequence",
"t": "Swift.IteratorProtocol",
"U": "Swift.UnsignedInteger",
"u": "Swift.UInt",
"V": "Swift.UnsafeRawPointer",
"v": "Swift.UnsafeMutableRawPointer",
"W": "Swift.UnsafeRawBufferPointer",
"w": "Swift.UnsafeMutableRawBufferPointer",
"X": "Swift.RangeExpression",
"x": "Swift.Strideable",
"Y": "Swift.RawRepresentable",
"y": "Swift.StringProtocol",
"Z": "Swift.SignedInteger",
"z": "Swift.BinaryInteger",
}
var MangledKnownTypeKind2 = map[string]string{
"A": "Swift.Actor",
"C": "Swift.CheckedContinuation",
"c": "Swift.UnsafeContinuation",
"E": "Swift.CancellationError",
"e": "Swift.UnownedSerialExecutor",
"F": "Swift.Executor",
"f": "Swift.SerialExecutor",
"G": "Swift.TaskGroup",
"g": "Swift.ThrowingTaskGroup",
"I": "Swift.AsyncIteratorProtocol",
"i": "Swift.AsyncSequence",
"J": "Swift.UnownedJob",
"M": "Swift.MainActor",
"P": "Swift.TaskPriority",
"S": "Swift.AsyncStream",
"s": "Swift.AsyncThrowingStream",
"T": "Swift.Task",
"t": "Swift.UnsafeCurrentTask",
}
var MangledType = map[string]string{
"Bb": "Builtin.BridgeObject",
"BB": "Builtin.UnsafeValueBuffer",
"Bc": "Builtin.RawUnsafeContinuation",
"BD": "Builtin.DefaultActorStorage",
"Be": "Builtin.Executor",
"Bd": "Builtin.NonDefaultDistributedActorStorage",
"Bf": "Builtin.Float<n>",
"Bi": "Builtin.Int<n>",
"BI": "Builtin.IntLiteral",
"Bj": "Builtin.Job",
"BP": "Builtin.PackIndex",
"BO": "Builtin.UnknownObject",
"Bo": "Builtin.NativeObject",
"Bp": "Builtin.RawPointer",
"Bt": "Builtin.SILToken",
"Bv": "Builtin.Vec<n>x<type>",
"Bw": "Builtin.Word",
"c": "function type (escaping)",
"X": "special function type",
"Sg": "?",
"ySqG": "?",
"GSg": "?",
"_pSg": "?",
"SgSg": "??",
"ypG": "Any",
"p": "Any",
"SSG": "String",
"SSGSg": "String?",
"SSSgG": "String?",
"SpySvSgGG": "UnsafeMutablePointer<UNumberFormat?>",
"SiGSg": "Int?",
"Xo": "@unowned type",
"Xu": "@unowned(unsafe) type",
"Xw": "@weak type",
"XF": "function implementation type (currently unused)",
"Xb": "SIL @box type (deprecated)",
"Xx": "SIL box type",
"XD": "dynamic self type",
"m": "metatype without representation",
"XM": "metatype with representation",
"Xp": "existential metatype without representation",
"Xm": "existential metatype with representation",
"Xe": "(error)",
"x": "A",
"q_": "B",
"yxq_G": "<A, B>",
"xq_": "<A, B>",
"Sb": "Swift.Bool",
"Qz": "==",
"Qy_": "==",
"Qy0_": "==",
"SgXw": "?",
}
MangledType is a mangled type map
Functions ¶
This section is empty.
Types ¶
type ATRecordType ¶ added in v1.1.100
type ATRecordType struct { AssociatedTypeRecord Name string SubstitutedTypeName string }
type AccessibleFunctionCacheEntry ¶ added in v1.1.166
type AccessibleFunctionFlags ¶ added in v1.1.166
type AccessibleFunctionFlags uint32
const (
Distributed AccessibleFunctionFlags = 0
)
type AccessibleFunctionsSection ¶ added in v1.1.166
type AccessibleFunctionsState ¶ added in v1.1.166
type AccessibleFunctionsState struct { Cache AccessibleFunctionCacheEntry SectionsToScan AccessibleFunctionsSection }
type Anonymous ¶ added in v1.1.169
type Anonymous struct { TargetAnonymousContextDescriptor GenericContext *GenericContext MangledContextName string }
type AnonymousContextDescriptorFlags ¶ added in v1.1.169
type AnonymousContextDescriptorFlags uint16
Flags for anonymous type context descriptors. These values are used as the kindSpecificFlags of the ContextDescriptorFlags for the anonymous context.
func (AnonymousContextDescriptorFlags) HasMangledName ¶ added in v1.1.169
func (f AnonymousContextDescriptorFlags) HasMangledName() bool
type AssociatedType ¶ added in v1.1.166
type AssociatedType struct { AssociatedTypeDescriptor Address uint64 ConformingTypeAddr uint64 ConformingTypeName string ProtocolTypeName string TypeRecords []ATRecordType }
func (AssociatedType) String ¶ added in v1.1.166
func (a AssociatedType) String() string
func (AssociatedType) Verbose ¶ added in v1.1.166
func (a AssociatedType) Verbose() string
type AssociatedTypeDescriptor ¶
type AssociatedTypeDescriptor struct { ConformingTypeNameOffset RelativeDirectPointer ProtocolTypeNameOffset RelativeDirectPointer NumAssociatedTypes uint32 AssociatedTypeRecordSize uint32 }
AssociatedTypeDescriptor an associated type descriptor contains a collection of associated type records for a conformance. ref: include/swift/RemoteInspection/Records.h
func (*AssociatedTypeDescriptor) Read ¶ added in v1.1.166
func (a *AssociatedTypeDescriptor) Read(r io.Reader, addr uint64) error
func (AssociatedTypeDescriptor) Size ¶ added in v1.1.166
func (a AssociatedTypeDescriptor) Size() int64
type AssociatedTypeRecord ¶
type AssociatedTypeRecord struct { NameOffset RelativeDirectPointer SubstitutedTypeNameOffset RelativeDirectPointer }
AssociatedTypeRecord type records describe the mapping from an associated type to the type witness of a conformance. ref: include/swift/RemoteInspection/Records.h
func (*AssociatedTypeRecord) Read ¶ added in v1.1.166
func (a *AssociatedTypeRecord) Read(r io.Reader, addr uint64) error
func (AssociatedTypeRecord) Size ¶ added in v1.1.166
func (a AssociatedTypeRecord) Size() int64
type AutomaticDynamicReplacementEntry ¶ added in v1.1.166
type AutomaticDynamicReplacements ¶ added in v1.1.166
type AutomaticDynamicReplacements struct { Flags uint32 NumScopes uint32 AutomaticDynamicReplacementEntry }
type AutomaticDynamicReplacementsSome ¶ added in v1.1.166
type AutomaticDynamicReplacementsSome struct { Flags uint32 NumReplacements uint32 Replacements []DynamicReplacementSomeDescriptor }
type BuiltinType ¶ added in v1.1.0
type BuiltinType struct { BuiltinTypeDescriptor Name string }
BuiltinType builtin swift type
func (BuiltinType) String ¶ added in v1.1.100
func (b BuiltinType) String() string
func (BuiltinType) Verbose ¶ added in v1.1.166
func (b BuiltinType) Verbose() string
type BuiltinTypeDescriptor ¶
type BuiltinTypeDescriptor struct { TypeName RelativeDirectPointer Size uint32 AlignmentAndFlags builtinTypeFlag Stride uint32 NumExtraInhabitants uint32 }
BuiltinTypeDescriptor type records describe basic layout information about any builtin types referenced from the other sections. ref: include/swift/RemoteInspection/Records.h
type Capture ¶ added in v1.1.166
type Capture struct { CaptureDescriptor Address uint64 CaptureTypes []CaptureType MetadataSources []MetadataSource Bindings []NecessaryBindings }
type CaptureDescriptor ¶
type CaptureDescriptor struct { NumCaptureTypes uint32 // The number of captures in the closure and the number of typerefs that immediately follow this struct. NumMetadataSources uint32 // The number of sources of metadata available in the MetadataSourceMap directly following the list of capture's typerefs. NumBindings uint32 // The number of items in the NecessaryBindings structure at the head of the closure. }
CaptureDescriptor describe the layout of a closure context object. Unlike nominal types, the generic substitutions for a closure context come from the object, and not the metadata. ref: include/swift/RemoteInspection/Records.h - CaptureDescriptor
type CaptureType ¶ added in v1.1.170
type CaptureType struct { CaptureTypeRecord TypeName string }
type CaptureTypeRecord ¶
type CaptureTypeRecord struct {
MangledTypeName RelativeDirectPointer
}
func (*CaptureTypeRecord) Read ¶ added in v1.1.170
func (ctr *CaptureTypeRecord) Read(r io.Reader, addr uint64) error
func (CaptureTypeRecord) Size ¶ added in v1.1.170
func (ctr CaptureTypeRecord) Size() int64
type Class ¶ added in v1.1.167
type Class struct { TargetClassDescriptor SuperClass string GenericContext *TypeGenericContext ForeignMetadata *TargetForeignMetadataInitialization SingletonMetadata *TargetSingletonMetadataInitialization VTable *VTable ResilientSuperclass *ResilientSuperclass MethodOverrides []TargetMethodOverrideDescriptor ObjCResilientClassStubInfo *TargetObjCResilientClassStubInfo Metadatas []Metadata MetadataAccessors []TargetCanonicalSpecializedMetadataAccessorsListEntry CachingOnceToken *TargetCanonicalSpecializedMetadatasCachingOnceToken }
type ClassFlags ¶ added in v1.1.177
type ClassFlags uint32
const ( /// Is this a Swift class from the Darwin pre-stable ABI? /// This bit is clear in stable ABI Swift classes. /// The Objective-C runtime also reads this bit. IsSwiftPreStableABI ClassFlags = 0x1 /// Does this class use Swift refcounting? UsesSwiftRefcounting ClassFlags = 0x2 /// Has this class a custom name, specified with the @objc attribute? HasCustomObjCName ClassFlags = 0x4 /// Whether this metadata is a specialization of a generic metadata pattern /// which was created during compilation. IsStaticSpecialization ClassFlags = 0x8 /// Whether this metadata is a specialization of a generic metadata pattern /// which was created during compilation and made to be canonical by /// modifying the metadata accessor. IsCanonicalStaticSpecialization ClassFlags = 0x10 )
type ConformanceDescriptor ¶ added in v1.1.166
type ConformanceDescriptor struct { TargetProtocolConformanceDescriptor Address uint64 Protocol string TypeRef *Type Retroactive *RelativeString // context of a retroactive conformance ConditionalRequirements []TargetGenericRequirement ConditionalPackShapes []GenericPackShapeDescriptor ResilientWitnesses []ResilientWitnesses GenericWitnessTable *TargetGenericWitnessTable WitnessTablePattern *PCDWitnessTable }
func (ConformanceDescriptor) String ¶ added in v1.1.166
func (c ConformanceDescriptor) String() string
func (ConformanceDescriptor) Verbose ¶ added in v1.1.166
func (c ConformanceDescriptor) Verbose() string
type ConformanceFlags ¶ added in v1.1.166
type ConformanceFlags uint32
const ( UnusedLowBits ConformanceFlags = 0x07 // historical conformance kind TypeMetadataKindMask ConformanceFlags = 0x7 << 3 // 8 type reference kinds TypeMetadataKindShift = 3 IsRetroactiveMask ConformanceFlags = 0x01 << 6 IsSynthesizedNonUniqueMask ConformanceFlags = 0x01 << 7 NumConditionalRequirementsMask ConformanceFlags = 0xFF << 8 NumConditionalRequirementsShift = 8 HasResilientWitnessesMask ConformanceFlags = 0x01 << 16 HasGenericWitnessTableMask ConformanceFlags = 0x01 << 17 NumConditionalPackDescriptorsMask ConformanceFlags = 0xFF << 24 NumConditionalPackDescriptorsShift = 24 )
func (ConformanceFlags) GetNumConditionalRequirements ¶ added in v1.1.166
func (f ConformanceFlags) GetNumConditionalRequirements() int
GetNumConditionalRequirements retrieve the # of conditional requirements.
func (ConformanceFlags) GetTypeReferenceKind ¶ added in v1.1.166
func (f ConformanceFlags) GetTypeReferenceKind() TypeReferenceKind
GetTypeReferenceKind retrieve the type reference kind kind.
func (ConformanceFlags) HasGenericWitnessTable ¶ added in v1.1.166
func (f ConformanceFlags) HasGenericWitnessTable() bool
HasGenericWitnessTable whether this conformance has a generic witness table that may need to be instantiated.
func (ConformanceFlags) HasResilientWitnesses ¶ added in v1.1.166
func (f ConformanceFlags) HasResilientWitnesses() bool
HasResilientWitnesses whether this conformance has any resilient witnesses.
func (ConformanceFlags) IsRetroactive ¶ added in v1.1.166
func (f ConformanceFlags) IsRetroactive() bool
IsRetroactive Is the conformance "retroactive"?
A conformance is retroactive when it occurs in a module that is neither the module in which the protocol is defined nor the module in which the conforming type is defined. With retroactive conformance, it is possible to detect a conflict at run time.
func (ConformanceFlags) IsSynthesizedNonUnique ¶ added in v1.1.166
func (f ConformanceFlags) IsSynthesizedNonUnique() bool
IsSynthesizedNonUnique is the conformance synthesized in a non-unique manner?
The Swift compiler will synthesize conformances on behalf of some imported entities (e.g., C typedefs with the swift_wrapper attribute). Such conformances are retroactive by nature, but the presence of multiple such conformances is not a conflict because all synthesized conformances will be equivalent.
func (ConformanceFlags) NumConditionalPackShapeDescriptors ¶ added in v1.1.166
func (f ConformanceFlags) NumConditionalPackShapeDescriptors() int
NumConditionalPackShapeDescriptors retrieve the # of conditional pack shape descriptors.
func (ConformanceFlags) String ¶ added in v1.1.166
func (f ConformanceFlags) String() string
type ContextDescriptorFlags ¶ added in v1.1.166
type ContextDescriptorFlags uint32
func (ContextDescriptorFlags) IsGeneric ¶ added in v1.1.166
func (f ContextDescriptorFlags) IsGeneric() bool
func (ContextDescriptorFlags) IsUnique ¶ added in v1.1.166
func (f ContextDescriptorFlags) IsUnique() bool
func (ContextDescriptorFlags) Kind ¶ added in v1.1.166
func (f ContextDescriptorFlags) Kind() ContextDescriptorKind
func (ContextDescriptorFlags) KindSpecific ¶ added in v1.1.166
func (f ContextDescriptorFlags) KindSpecific() TypeContextDescriptorFlags
func (ContextDescriptorFlags) String ¶ added in v1.1.166
func (f ContextDescriptorFlags) String() string
func (ContextDescriptorFlags) Version ¶ added in v1.1.166
func (f ContextDescriptorFlags) Version() uint8
type ContextDescriptorKind ¶ added in v1.1.166
type ContextDescriptorKind uint8
const ( // This context descriptor represents a module. CDKindModule ContextDescriptorKind = 0 // module /// This context descriptor represents an extension. CDKindExtension ContextDescriptorKind = 1 // extension /// This context descriptor represents an anonymous possibly-generic context /// such as a function body. CDKindAnonymous ContextDescriptorKind = 2 // anonymous /// This context descriptor represents a protocol context. CDKindProtocol ContextDescriptorKind = 3 // protocol /// This context descriptor represents an opaque type alias. CDKindOpaqueType ContextDescriptorKind = 4 // opaque_type /// First kind that represents a type of any sort. CDKindTypeFirst = 16 // type_first /// This context descriptor represents a class. CDKindClass ContextDescriptorKind = CDKindTypeFirst // class /// This context descriptor represents a struct. CDKindStruct ContextDescriptorKind = CDKindTypeFirst + 1 // struct /// This context descriptor represents an enum. CDKindEnum ContextDescriptorKind = CDKindTypeFirst + 2 // enum /// Last kind that represents a type of any sort. CDKindTypeLast = 31 // type_last )
func (ContextDescriptorKind) String ¶ added in v1.1.166
func (i ContextDescriptorKind) String() string
type DynamicReplacementChainEntry ¶ added in v1.1.166
type DynamicReplacementDescriptor ¶ added in v1.1.100
type DynamicReplacementDescriptor struct { ReplacedFunctionKey int32 // DynamicReplacementKey ReplacementFunction int32 // UNION w/ ReplacementAsyncFunction - TargetCompactFunctionPointer|TargetRelativeDirectPointer ChainEntry int32 // DynamicReplacementChainEntry Flags uint32 }
func (DynamicReplacementDescriptor) ShouldChain ¶ added in v1.1.166
func (d DynamicReplacementDescriptor) ShouldChain() bool
type DynamicReplacementKey ¶ added in v1.1.100
func (DynamicReplacementKey) ExtraDiscriminator ¶ added in v1.1.166
func (d DynamicReplacementKey) ExtraDiscriminator() uint16
func (DynamicReplacementKey) IsAsync ¶ added in v1.1.166
func (d DynamicReplacementKey) IsAsync() bool
type DynamicReplacementScope ¶ added in v1.1.100
type DynamicReplacementScope struct { Flags uint32 NumReplacements uint32 // hard coded to 1 DynamicReplacementDescriptor }
type DynamicReplacementSomeDescriptor ¶ added in v1.1.166
type Enum ¶ added in v1.1.166
type Enum struct { TargetEnumDescriptor GenericContext *TypeGenericContext ForeignMetadata *TargetForeignMetadataInitialization SingletonMetadata *TargetSingletonMetadataInitialization Metadatas []Metadata CachingOnceToken *TargetCanonicalSpecializedMetadatasCachingOnceToken }
type ExtendedExistentialTypeShapeFlags ¶ added in v1.1.169
type ExtendedExistentialTypeShapeFlags uint32
func (ExtendedExistentialTypeShapeFlags) GetSpecialKind ¶ added in v1.1.169
func (f ExtendedExistentialTypeShapeFlags) GetSpecialKind() SpecialKind
func (ExtendedExistentialTypeShapeFlags) HasGeneralizationSignature ¶ added in v1.1.169
func (f ExtendedExistentialTypeShapeFlags) HasGeneralizationSignature() bool
func (ExtendedExistentialTypeShapeFlags) HasImplicitGenSigParams ¶ added in v1.1.169
func (f ExtendedExistentialTypeShapeFlags) HasImplicitGenSigParams() bool
The parameters of the generalization signature are not stored explicitly in the shape.
In order to enable this, there must be no more than MaxNumImplicitGenericParamDescriptors generic parameters, and they must match GenericParamDescriptor::implicit().
func (ExtendedExistentialTypeShapeFlags) HasImplicitReqSigParams ¶ added in v1.1.169
func (f ExtendedExistentialTypeShapeFlags) HasImplicitReqSigParams() bool
The parameters of the requirement signature are not stored explicitly in the shape.
In order to enable this, there must be no more than MaxNumImplicitGenericParamDescriptors generic parameters, and they must match GenericParamDescriptor::implicit().
func (ExtendedExistentialTypeShapeFlags) HasSuggestedValueWitnesses ¶ added in v1.1.169
func (f ExtendedExistentialTypeShapeFlags) HasSuggestedValueWitnesses() bool
func (ExtendedExistentialTypeShapeFlags) HasTypeExpression ¶ added in v1.1.169
func (f ExtendedExistentialTypeShapeFlags) HasTypeExpression() bool
func (ExtendedExistentialTypeShapeFlags) HasTypePacks ¶ added in v1.1.169
func (f ExtendedExistentialTypeShapeFlags) HasTypePacks() bool
Whether the generic context has type parameter packs. This occurs when the existential has a superclass requirement whose class declaration has a type parameter pack, eg `any P & C<...>` with `class C<each T> {}`.
func (ExtendedExistentialTypeShapeFlags) IsClassConstrained ¶ added in v1.1.169
func (f ExtendedExistentialTypeShapeFlags) IsClassConstrained() bool
func (ExtendedExistentialTypeShapeFlags) IsMetatypeConstrained ¶ added in v1.1.169
func (f ExtendedExistentialTypeShapeFlags) IsMetatypeConstrained() bool
func (ExtendedExistentialTypeShapeFlags) IsOpaque ¶ added in v1.1.169
func (f ExtendedExistentialTypeShapeFlags) IsOpaque() bool
func (ExtendedExistentialTypeShapeFlags) String ¶ added in v1.1.169
func (f ExtendedExistentialTypeShapeFlags) String() string
type Extension ¶ added in v1.1.169
type Extension struct { TargetExtensionContextDescriptor GenericContext *GenericContext }
type ExtraClassDescriptorFlags ¶ added in v1.1.166
type ExtraClassDescriptorFlags uint32
Extra flags for resilient classes, since we need more than 16 bits of flags there.
func (ExtraClassDescriptorFlags) HasObjCResilientClassStub ¶ added in v1.1.167
func (f ExtraClassDescriptorFlags) HasObjCResilientClassStub() bool
type Field ¶ added in v1.1.166
type Field struct { FieldDescriptor Address uint64 Type string SuperClass string Records []FieldRecord }
func (Field) IsProtocol ¶ added in v1.1.166
type FieldDescriptor ¶ added in v1.1.166
type FieldDescriptor struct { MangledTypeNameOffset RelativeDirectPointer SuperclassOffset RelativeDirectPointer Kind FieldDescriptorKind FieldRecordSize uint16 NumFields uint32 }
FieldDescriptor contain a collection of field records for a single class, struct or enum declaration. ref: swift/include/swift/Reflection/Records.h
func (*FieldDescriptor) Read ¶ added in v1.1.166
func (fd *FieldDescriptor) Read(r io.Reader, addr uint64) error
func (FieldDescriptor) Size ¶ added in v1.1.166
func (fd FieldDescriptor) Size() uint64
type FieldDescriptorKind ¶ added in v1.1.166
type FieldDescriptorKind uint16
const ( // Swift nominal types. FDKindStruct FieldDescriptorKind = iota // struct FDKindClass // class FDKindEnum // enum // Fixed-size multi-payload enums have a special descriptor format that // encodes spare bits. // // FIXME: Actually implement this. For now, a descriptor with this kind // just means we also have a builtin descriptor from which we get the // size and alignment. FDKindMultiPayloadEnum // multi-payload enum // A Swift opaque protocol. There are no fields, just a record for the // type itself. FDKindProtocol // protocol // A Swift class-bound protocol. FDKindClassProtocol // class protocol // An Objective-C protocol, which may be imported or defined in Swift. FDKindObjCProtocol // objc protocol // An Objective-C class, which may be imported or defined in Swift. // In the former case, field type metadata is not emitted, and // must be obtained from the Objective-C runtime. FDKindObjCClass // objc class )
func (FieldDescriptorKind) String ¶ added in v1.1.166
func (i FieldDescriptorKind) String() string
type FieldRecord ¶ added in v1.1.166
type FieldRecord struct { FieldRecordDescriptor Name string MangledType string }
type FieldRecordDescriptor ¶ added in v1.1.166
type FieldRecordDescriptor struct { Flags FieldRecordFlags MangledTypeNameOffset RelativeDirectPointer FieldNameOffset RelativeDirectPointer }
func (*FieldRecordDescriptor) Read ¶ added in v1.1.166
func (frd *FieldRecordDescriptor) Read(r io.Reader, addr uint64) error
func (FieldRecordDescriptor) Size ¶ added in v1.1.166
func (fd FieldRecordDescriptor) Size() uint64
type FieldRecordFlags ¶ added in v1.1.166
type FieldRecordFlags uint32
const ( // IsIndirectCase is this an indirect enum case? IsIndirectCase FieldRecordFlags = 0x1 // IsVar is this a mutable `var` property? IsVar FieldRecordFlags = 0x2 // IsArtificial is this an artificial field? IsArtificial FieldRecordFlags = 0x4 )
func (FieldRecordFlags) IsArtificial ¶ added in v1.1.171
func (f FieldRecordFlags) IsArtificial() bool
func (FieldRecordFlags) IsIndirectCase ¶ added in v1.1.171
func (f FieldRecordFlags) IsIndirectCase() bool
func (FieldRecordFlags) IsVar ¶ added in v1.1.171
func (f FieldRecordFlags) IsVar() bool
func (FieldRecordFlags) String ¶ added in v1.1.166
func (f FieldRecordFlags) String() string
type GenericContext ¶ added in v1.1.166
type GenericContext struct { TargetGenericContextDescriptorHeader Parameters []GenericParamDescriptor Requirements []TargetGenericRequirementDescriptor TypePacks []GenericPackShapeDescriptor }
type GenericContextDescriptorFlags ¶ added in v1.1.166
type GenericContextDescriptorFlags uint16
func (GenericContextDescriptorFlags) HasTypePacks ¶ added in v1.1.166
func (f GenericContextDescriptorFlags) HasTypePacks() bool
HasTypePacks is whether this generic context has at least one type parameter pack, in which case the generic context will have a trailing GenericPackShapeHeader.
type GenericEnvironmentFlags ¶ added in v1.1.166
type GenericEnvironmentFlags uint32
func (GenericEnvironmentFlags) GetNumGenericParameterLevels ¶ added in v1.1.166
func (f GenericEnvironmentFlags) GetNumGenericParameterLevels() uint32
func (GenericEnvironmentFlags) GetNumGenericRequirements ¶ added in v1.1.166
func (f GenericEnvironmentFlags) GetNumGenericRequirements() uint32
type GenericMetadataPattern ¶ added in v1.1.177
type GenericMetadataPattern struct { TargetGenericMetadataPattern ValueWitnessTable *ValueWitnessTable ExtraDataPattern *TargetGenericMetadataPartialPattern }
type GenericMetadataPatternFlags ¶ added in v1.1.166
type GenericMetadataPatternFlags uint32
func (GenericMetadataPatternFlags) HasClassImmediateMembersPattern ¶ added in v1.1.177
func (f GenericMetadataPatternFlags) HasClassImmediateMembersPattern() bool
func (GenericMetadataPatternFlags) HasExtraDataPattern ¶ added in v1.1.166
func (f GenericMetadataPatternFlags) HasExtraDataPattern() bool
func (GenericMetadataPatternFlags) HasTrailingFlags ¶ added in v1.1.166
func (f GenericMetadataPatternFlags) HasTrailingFlags() bool
func (GenericMetadataPatternFlags) MetadataKind ¶ added in v1.1.166
func (f GenericMetadataPatternFlags) MetadataKind() MetadataKind
func (GenericMetadataPatternFlags) String ¶ added in v1.1.177
func (f GenericMetadataPatternFlags) String() string
type GenericPackKind ¶ added in v1.1.166
type GenericPackKind uint16
const ( GPKMetadata GenericPackKind = 0 // metadata GPKWitnessTable GenericPackKind = 1 // witness-table )
func (GenericPackKind) String ¶ added in v1.1.169
func (i GenericPackKind) String() string
type GenericPackShapeDescriptor ¶ added in v1.1.166
type GenericPackShapeDescriptor struct { Kind GenericPackKind Index uint16 // The index of this metadata pack or witness table pack in the generic arguments array. ShapeClass uint16 // The equivalence class of this pack under the same-shape relation. // contains filtered or unexported fields }
GenericPackShapeDescriptor the GenericPackShapeHeader is followed by an array of these descriptors, whose length is given by the header's NumPacks field.
The invariant is that all pack descriptors with GenericPackKind::Metadata must precede those with GenericPackKind::WitnessTable, and for each kind, the pack descriptors are ordered by their Index.
This allows us to iterate over the generic arguments array in parallel with the array of pack shape descriptors. We know we have a metadata or witness table when we reach the generic argument whose index is stored in the next descriptor; we increment the descriptor pointer in this case.
ref: swift/ABI/GenericContext.h - GenericPackShapeDescriptor
type GenericPackShapeHeader ¶ added in v1.1.166
type GenericPackShapeHeader struct { NumPacks uint16 // The number of generic parameters and conformance requirements which are packs. NumShapeClasses uint16 // The number of equivalence classes in the same-shape relation. }
GenericPackShapeHeader object ref: swift/ABI/GenericContext.h - GenericPackShapeHeader
type GenericParamDescriptor ¶ added in v1.1.166
type GenericParamDescriptor uint8
Don't set 0x40 for compatibility with pre-Swift 5.8 runtimes (4 byte align)
func (GenericParamDescriptor) GetKind ¶ added in v1.1.166
func (g GenericParamDescriptor) GetKind() GenericParamKind
func (GenericParamDescriptor) HasKeyArgument ¶ added in v1.1.166
func (g GenericParamDescriptor) HasKeyArgument() bool
func (GenericParamDescriptor) String ¶ added in v1.1.176
func (g GenericParamDescriptor) String() string
type GenericParamKind ¶ added in v1.1.166
type GenericParamKind uint8
const ( // A type parameter. GPKType GenericParamKind = 0 // type // A type parameter pack. GPKTypePack GenericParamKind = 1 // type_pack GPKMax GenericParamKind = 0x3F // max )
func (GenericParamKind) String ¶ added in v1.1.176
func (i GenericParamKind) String() string
type GenericRequirementFlags ¶ added in v1.1.166
type GenericRequirementFlags uint32
func (GenericRequirementFlags) HasExtraArgument ¶ added in v1.1.166
func (f GenericRequirementFlags) HasExtraArgument() bool
func (GenericRequirementFlags) HasKeyArgument ¶ added in v1.1.166
func (f GenericRequirementFlags) HasKeyArgument() bool
func (GenericRequirementFlags) Kind ¶ added in v1.1.166
func (f GenericRequirementFlags) Kind() GenericRequirementKind
func (GenericRequirementFlags) String ¶ added in v1.1.166
func (f GenericRequirementFlags) String() string
type GenericRequirementKind ¶ added in v1.1.166
type GenericRequirementKind uint8
const ( // A protocol requirement. GRKindProtocol GenericRequirementKind = 0 // protocol // A same-type requirement. GRKindSameType GenericRequirementKind = 1 // same-type // A base class requirement. GRKindBaseClass GenericRequirementKind = 2 // base-class // A "same-conformance" requirement, implied by a same-type or base-class constraint that binds a parameter with protocol requirements. GRKindSameConformance GenericRequirementKind = 3 // same-conformance // A same-shape requirement between generic parameter packs. GRKSameShape GenericRequirementKind = 4 // same-shape // A layout requirement. GRKindLayout GenericRequirementKind = 0x1F // layout )
func (GenericRequirementKind) String ¶ added in v1.1.166
func (i GenericRequirementKind) String() string
type GenericRequirementLayoutKind ¶ added in v1.1.177
type GenericRequirementLayoutKind uint32
const ( // A class constraint. GRLKClass GenericRequirementLayoutKind = 0 // class )
func (GenericRequirementLayoutKind) String ¶ added in v1.1.177
func (i GenericRequirementLayoutKind) String() string
type Metadata ¶ added in v1.1.166
type Metadata struct { TargetCanonicalSpecializedMetadatasListEntry TargetMetadata }
type MetadataInitializationKind ¶ added in v1.1.166
type MetadataInitializationKind uint8
const ( // There are either no special rules for initializing the metadata or the metadata is generic. // (Genericity is set in the non-kind-specific descriptor flags.) MetadataInitNone MetadataInitializationKind = 0 // none //The type requires non-trivial singleton initialization using the "in-place" code pattern. MetadataInitSingleton MetadataInitializationKind = 1 // singleton // The type requires non-trivial singleton initialization using the "foreign" code pattern. MetadataInitForeign MetadataInitializationKind = 2 // foreign )
func (MetadataInitializationKind) Foreign ¶ added in v1.1.177
func (k MetadataInitializationKind) Foreign() bool
func (MetadataInitializationKind) None ¶ added in v1.1.177
func (k MetadataInitializationKind) None() bool
func (MetadataInitializationKind) Singleton ¶ added in v1.1.177
func (k MetadataInitializationKind) Singleton() bool
func (MetadataInitializationKind) String ¶ added in v1.1.166
func (i MetadataInitializationKind) String() string
type MetadataKind ¶ added in v1.1.166
type MetadataKind uint32
const ( ClassMetadataKind MetadataKind = 0 // class StructMetadataKind MetadataKind = 0 | MetadataKindIsNonHeap // struct EnumMetadataKind MetadataKind = 1 | MetadataKindIsNonHeap // enum OptionalMetadataKind MetadataKind = 2 | MetadataKindIsNonHeap // optional ForeignClassMetadataKind MetadataKind = 3 | MetadataKindIsNonHeap // foreign class ForeignReferenceTypeMetadataKind MetadataKind = 4 | MetadataKindIsNonHeap // foreign reference type OpaqueMetadataKind MetadataKind = 0 | MetadataKindIsRuntimePrivate | MetadataKindIsNonHeap // opaque TupleMetadataKind MetadataKind = 1 | MetadataKindIsRuntimePrivate | MetadataKindIsNonHeap // tuple FunctionMetadataKind MetadataKind = 2 | MetadataKindIsRuntimePrivate | MetadataKindIsNonHeap // function ExistentialMetadataKind MetadataKind = 3 | MetadataKindIsRuntimePrivate | MetadataKindIsNonHeap // existential MetatypeMetadataKind MetadataKind = 4 | MetadataKindIsRuntimePrivate | MetadataKindIsNonHeap // metatype ObjCClassWrapperMetadataKind MetadataKind = 5 | MetadataKindIsRuntimePrivate | MetadataKindIsNonHeap // objc class wrapper ExistentialMetatypeMetadataKind MetadataKind = 6 | MetadataKindIsRuntimePrivate | MetadataKindIsNonHeap // existential metatype ExtendedExistentialMetadataKind MetadataKind = 7 | MetadataKindIsRuntimePrivate | MetadataKindIsNonHeap // extended existential type HeapLocalVariableMetadataKind MetadataKind = 0 | MetadataKindIsNonType // heap local variable HeapGenericLocalVariableMetadataKind MetadataKind = 0 | MetadataKindIsNonType | MetadataKindIsRuntimePrivate // heap generic local variable ErrorObjectMetadataKind MetadataKind = 1 | MetadataKindIsNonType | MetadataKindIsRuntimePrivate // error object TaskMetadataKind MetadataKind = 2 | MetadataKindIsNonType | MetadataKindIsRuntimePrivate // task JobMetadataKind MetadataKind = 3 | MetadataKindIsNonType | MetadataKindIsRuntimePrivate // job // The largest possible non-isa-pointer metadata kind value. LastEnumerated = 0x7FF )
func (MetadataKind) String ¶ added in v1.1.166
func (i MetadataKind) String() string
type MetadataSource ¶ added in v1.1.100
type MetadataSource struct { MetadataSourceRecord MangledType string MangledMetadataSource string }
type MetadataSourceRecord ¶
type MetadataSourceRecord struct { MangledTypeNameOff RelativeDirectPointer MangledMetadataSourceOff RelativeDirectPointer }
func (*MetadataSourceRecord) Read ¶ added in v1.1.170
func (msr *MetadataSourceRecord) Read(r io.Reader, addr uint64) error
func (MetadataSourceRecord) Size ¶ added in v1.1.170
func (msr MetadataSourceRecord) Size() int64
type Method ¶ added in v1.1.166
type Method struct { TargetMethodDescriptor Address uint64 Symbol string }
type MethodDescriptorFlags ¶ added in v1.1.166
type MethodDescriptorFlags uint32
func (MethodDescriptorFlags) ExtraDiscriminator ¶ added in v1.1.166
func (f MethodDescriptorFlags) ExtraDiscriminator() uint16
func (MethodDescriptorFlags) IsAsync ¶ added in v1.1.166
func (f MethodDescriptorFlags) IsAsync() bool
func (MethodDescriptorFlags) IsDynamic ¶ added in v1.1.166
func (f MethodDescriptorFlags) IsDynamic() bool
func (MethodDescriptorFlags) IsInstance ¶ added in v1.1.166
func (f MethodDescriptorFlags) IsInstance() bool
func (MethodDescriptorFlags) Kind ¶ added in v1.1.166
func (f MethodDescriptorFlags) Kind() MDKind
func (MethodDescriptorFlags) String ¶ added in v1.1.166
func (f MethodDescriptorFlags) String() string
func (MethodDescriptorFlags) Verbose ¶ added in v1.1.172
func (f MethodDescriptorFlags) Verbose() string
type MultiPayloadEnum ¶ added in v1.1.166
func (MultiPayloadEnum) String ¶ added in v1.1.166
func (e MultiPayloadEnum) String() string
type MultiPayloadEnumDescriptor ¶ added in v1.1.166
ref: include/swift/RemoteInspection/Records.h
type MultiPayloadEnumPayloadSpareBitMaskByteCount ¶ added in v1.1.166
type MultiPayloadEnumPayloadSpareBitMaskByteCount uint32
func (MultiPayloadEnumPayloadSpareBitMaskByteCount) ByteCount ¶ added in v1.1.166
func (f MultiPayloadEnumPayloadSpareBitMaskByteCount) ByteCount() uint16
func (MultiPayloadEnumPayloadSpareBitMaskByteCount) ByteOffset ¶ added in v1.1.166
func (f MultiPayloadEnumPayloadSpareBitMaskByteCount) ByteOffset() uint16
func (MultiPayloadEnumPayloadSpareBitMaskByteCount) String ¶ added in v1.1.166
func (f MultiPayloadEnumPayloadSpareBitMaskByteCount) String() string
type MultiPayloadEnumSizeAndFlags ¶ added in v1.1.166
type MultiPayloadEnumSizeAndFlags uint32
func (MultiPayloadEnumSizeAndFlags) Flags ¶ added in v1.1.166
func (f MultiPayloadEnumSizeAndFlags) Flags() uint16
func (MultiPayloadEnumSizeAndFlags) Size ¶ added in v1.1.166
func (f MultiPayloadEnumSizeAndFlags) Size() uint16
func (MultiPayloadEnumSizeAndFlags) String ¶ added in v1.1.166
func (f MultiPayloadEnumSizeAndFlags) String() string
func (MultiPayloadEnumSizeAndFlags) UsesPayloadSpareBits ¶ added in v1.1.166
func (f MultiPayloadEnumSizeAndFlags) UsesPayloadSpareBits() bool
type NecessaryBindings ¶ added in v1.1.100
type NecessaryBindings struct { Kind NecessaryBindingsKind RequirementsSet RelativeDirectPointer RequirementsVector RelativeDirectPointer Conformances RelativeDirectPointer }
func (*NecessaryBindings) Read ¶ added in v1.1.170
func (nb *NecessaryBindings) Read(r io.Reader, addr uint64) error
func (NecessaryBindings) Size ¶ added in v1.1.170
func (nb NecessaryBindings) Size() int64
type NecessaryBindingsKind ¶ added in v1.1.101
type NecessaryBindingsKind uint32
const ( PartialApply NecessaryBindingsKind = iota AsyncFunction )
func (NecessaryBindingsKind) String ¶ added in v1.1.101
func (i NecessaryBindingsKind) String() string
type OpaqueType ¶ added in v1.1.169
type OpaqueType struct { TargetOpaqueTypeDescriptor GenericContext *GenericContext TypeArgs []RelativeString }
type PCDWitnessTable ¶ added in v1.1.166
type Protocol ¶ added in v1.1.166
type Protocol struct { TargetProtocolDescriptor Address uint64 Name string Parent *TargetModuleContext AssociatedTypes []string SignatureRequirements []TargetGenericRequirement Requirements []TargetProtocolRequirement }
Protocol swift protocol object
type ProtocolContextDescriptorFlags ¶ added in v1.1.166
type ProtocolContextDescriptorFlags uint16
ProtocolContextDescriptorFlags flags for protocol context descriptors. These values are used as the kindSpecificFlags of the ContextDescriptorFlags for the protocol.
func (ProtocolContextDescriptorFlags) IsClassConstrained ¶ added in v1.1.177
func (f ProtocolContextDescriptorFlags) IsClassConstrained() bool
func (ProtocolContextDescriptorFlags) IsResilient ¶ added in v1.1.177
func (f ProtocolContextDescriptorFlags) IsResilient() bool
func (ProtocolContextDescriptorFlags) SpecialProtocol ¶ added in v1.1.177
func (f ProtocolContextDescriptorFlags) SpecialProtocol() SpecialProtocol
func (ProtocolContextDescriptorFlags) String ¶ added in v1.1.177
func (f ProtocolContextDescriptorFlags) String() string
type ProtocolRequirementFlags ¶ added in v1.1.166
type ProtocolRequirementFlags uint32
func (ProtocolRequirementFlags) ExtraDiscriminator ¶ added in v1.1.166
func (f ProtocolRequirementFlags) ExtraDiscriminator() uint16
func (ProtocolRequirementFlags) IsAsync ¶ added in v1.1.166
func (f ProtocolRequirementFlags) IsAsync() bool
func (ProtocolRequirementFlags) IsFunctionImpl ¶ added in v1.1.166
func (f ProtocolRequirementFlags) IsFunctionImpl() bool
func (ProtocolRequirementFlags) IsInstance ¶ added in v1.1.166
func (f ProtocolRequirementFlags) IsInstance() bool
func (ProtocolRequirementFlags) IsSignedWithAddress ¶ added in v1.1.166
func (f ProtocolRequirementFlags) IsSignedWithAddress() bool
func (ProtocolRequirementFlags) Kind ¶ added in v1.1.166
func (f ProtocolRequirementFlags) Kind() ProtocolRequirementKind
func (ProtocolRequirementFlags) String ¶ added in v1.1.166
func (f ProtocolRequirementFlags) String() string
func (ProtocolRequirementFlags) Verbose ¶ added in v1.1.172
func (f ProtocolRequirementFlags) Verbose() string
type ProtocolRequirementKind ¶ added in v1.1.166
type ProtocolRequirementKind uint8
const ( PRKindBaseProtocol ProtocolRequirementKind = iota // base protocol PRKindMethod // method PRKindInit // initializer PRKindGetter // getter PRKindSetter // setter PRKindReadCoroutine // read coroutine PRKindModifyCoroutine // modify coroutine PRKindAssociatedTypeAccessFunction // associated type access function PRKindAssociatedConformanceAccessFunction // associated conformance access function )
func (ProtocolRequirementKind) String ¶ added in v1.1.166
func (i ProtocolRequirementKind) String() string
type RelativeDirectPointer ¶ added in v1.1.166
func (RelativeDirectPointer) GetAddress ¶ added in v1.1.166
func (r RelativeDirectPointer) GetAddress() uint64
func (RelativeDirectPointer) IsSet ¶ added in v1.1.166
func (r RelativeDirectPointer) IsSet() bool
type RelativeIndirectablePointer ¶ added in v1.1.166
func (RelativeIndirectablePointer) GetAddress ¶ added in v1.1.166
func (RelativeIndirectablePointer) GetRelPtrAddress ¶ added in v1.1.166
func (ri RelativeIndirectablePointer) GetRelPtrAddress() uint64
func (RelativeIndirectablePointer) IsSet ¶ added in v1.1.166
func (ri RelativeIndirectablePointer) IsSet() bool
type RelativeString ¶ added in v1.1.169
type RelativeString struct { RelativeDirectPointer Name string }
type RelativeTargetProtocolDescriptorPointer ¶ added in v1.1.177
func (RelativeTargetProtocolDescriptorPointer) GetAddress ¶ added in v1.1.177
func (RelativeTargetProtocolDescriptorPointer) GetRelPtrAddress ¶ added in v1.1.177
func (r RelativeTargetProtocolDescriptorPointer) GetRelPtrAddress() uint64
func (RelativeTargetProtocolDescriptorPointer) IsObjC ¶ added in v1.1.177
func (r RelativeTargetProtocolDescriptorPointer) IsObjC() bool
func (RelativeTargetProtocolDescriptorPointer) IsSet ¶ added in v1.1.177
func (r RelativeTargetProtocolDescriptorPointer) IsSet() bool
func (RelativeTargetProtocolDescriptorPointer) String ¶ added in v1.1.177
func (r RelativeTargetProtocolDescriptorPointer) String() string
type ResilientSuperclass ¶ added in v1.1.168
type ResilientSuperclass struct { TargetResilientSuperclass Type *Type }
type ResilientWitnesses ¶ added in v1.1.166
type ResilientWitnesses struct { TargetResilientWitness Symbol string Requirement TargetProtocolRequirement }
type SpecialKind ¶ added in v1.1.169
type SpecialKind uint32
const ( SKNone SpecialKind = 0 // none // The existential has a class constraint. // The inline storage is sizeof(void*) / alignof(void*), // the value is always stored inline, the value is reference- // counted (using unknown reference counting), and the // type metadata for the requirement generic parameters are // not stored in the existential container because they can // be recovered from the instance type of the class. SKClass SpecialKind = 1 // class // The existential has a metatype constraint. // The inline storage is sizeof(void*) / alignof(void*), // the value is always stored inline, the value is a Metadata*, // and the type metadata for the requirement generic parameters // are not stored in the existential container because they can // be recovered from the stored metatype. SKMetatype SpecialKind = 2 // metatype // The inline value storage has a non-storage layout. The shape // must include a value witness table. Type metadata for the // requirement generic parameters are still stored in the existential // container. SKExplicitLayout SpecialKind = 3 // explicit layout )
func (SpecialKind) String ¶ added in v1.1.169
func (i SpecialKind) String() string
type SpecialPointerAuthDiscriminators ¶ added in v1.1.100
type SpecialPointerAuthDiscriminators uint16
const ( /// HeapMetadataHeader::destroy DiscHeapDestructor SpecialPointerAuthDiscriminators = 0xbbbf /// Type descriptor data pointers. DiscTypeDescriptor SpecialPointerAuthDiscriminators = 0xae86 /// Runtime function variables exported by the runtime. DiscRuntimeFunctionEntry SpecialPointerAuthDiscriminators = 0x625b /// Protocol conformance descriptors. DiscProtocolConformanceDescriptor SpecialPointerAuthDiscriminators = 0xc6eb /// Pointer to value witness table stored in type metadata. /// /// Computed with ptrauth_string_discriminator("value_witness_table_t"). DiscValueWitnessTable SpecialPointerAuthDiscriminators = 0x2e3f /// Extended existential type shapes. DiscExtendedExistentialTypeShape SpecialPointerAuthDiscriminators = 0x5a3d // SpecialPointerAuthDiscriminators = 23101 DiscNonUniqueExtendedExistentialTypeShape SpecialPointerAuthDiscriminators = 0xe798 // SpecialPointerAuthDiscriminators = 59288 /// Value witness functions. DiscInitializeBufferWithCopyOfBuffer SpecialPointerAuthDiscriminators = 0xda4a DiscDestroy SpecialPointerAuthDiscriminators = 0x04f8 DiscInitializeWithCopy SpecialPointerAuthDiscriminators = 0xe3ba DiscAssignWithCopy SpecialPointerAuthDiscriminators = 0x8751 DiscInitializeWithTake SpecialPointerAuthDiscriminators = 0x48d8 DiscAssignWithTake SpecialPointerAuthDiscriminators = 0xefda DiscDestroyArray SpecialPointerAuthDiscriminators = 0x2398 DiscInitializeArrayWithCopy SpecialPointerAuthDiscriminators = 0xa05c DiscInitializeArrayWithTakeFrontToBack SpecialPointerAuthDiscriminators = 0x1c3e DiscInitializeArrayWithTakeBackToFront SpecialPointerAuthDiscriminators = 0x8dd3 DiscStoreExtraInhabitant SpecialPointerAuthDiscriminators = 0x79c5 DiscGetExtraInhabitantIndex SpecialPointerAuthDiscriminators = 0x2ca8 DiscGetEnumTag SpecialPointerAuthDiscriminators = 0xa3b5 DiscDestructiveProjectEnumData SpecialPointerAuthDiscriminators = 0x041d DiscDestructiveInjectEnumTag SpecialPointerAuthDiscriminators = 0xb2e4 DiscGetEnumTagSinglePayload SpecialPointerAuthDiscriminators = 0x60f0 DiscStoreEnumTagSinglePayload SpecialPointerAuthDiscriminators = 0xa0d1 /// KeyPath metadata functions. DiscKeyPathDestroy SpecialPointerAuthDiscriminators = 0x7072 DiscKeyPathCopy SpecialPointerAuthDiscriminators = 0x6f66 DiscKeyPathEquals SpecialPointerAuthDiscriminators = 0x756e DiscKeyPathHash SpecialPointerAuthDiscriminators = 0x6374 DiscKeyPathGetter SpecialPointerAuthDiscriminators = 0x6f72 DiscKeyPathNonmutatingSetter SpecialPointerAuthDiscriminators = 0x6f70 DiscKeyPathMutatingSetter SpecialPointerAuthDiscriminators = 0x7469 DiscKeyPathGetLayout SpecialPointerAuthDiscriminators = 0x6373 DiscKeyPathInitializer SpecialPointerAuthDiscriminators = 0x6275 DiscKeyPathMetadataAccessor SpecialPointerAuthDiscriminators = 0x7474 /// ObjC bridging entry points. DiscObjectiveCTypeDiscriminator SpecialPointerAuthDiscriminators = 0x31c3 // SpecialPointerAuthDiscriminators = 12739 DiscbridgeToObjectiveCDiscriminator SpecialPointerAuthDiscriminators = 0xbca0 // SpecialPointerAuthDiscriminators = 48288 DiscforceBridgeFromObjectiveCDiscriminator SpecialPointerAuthDiscriminators = 0x22fb // SpecialPointerAuthDiscriminators = 8955 DiscconditionallyBridgeFromObjectiveCDiscriminator SpecialPointerAuthDiscriminators = 0x9a9b // SpecialPointerAuthDiscriminators = 39579 /// Dynamic replacement pointers. DiscDynamicReplacementScope SpecialPointerAuthDiscriminators = 0x48F0 // SpecialPointerAuthDiscriminators = 18672 DiscDynamicReplacementKey SpecialPointerAuthDiscriminators = 0x2C7D // SpecialPointerAuthDiscriminators = 11389 /// Resume functions for yield-once coroutines that yield a single /// opaque borrowed/inout value. These aren't actually hard-coded, but /// they're important enough to be worth writing in one place. DiscOpaqueReadResumeFunction SpecialPointerAuthDiscriminators = 56769 DiscOpaqueModifyResumeFunction SpecialPointerAuthDiscriminators = 3909 /// ObjC class pointers. DiscObjCISA SpecialPointerAuthDiscriminators = 0x6AE1 DiscObjCSuperclass SpecialPointerAuthDiscriminators = 0xB5AB /// Resilient class stub initializer callback DiscResilientClassStubInitCallback SpecialPointerAuthDiscriminators = 0xC671 /// Jobs, tasks, and continuations. DiscJobInvokeFunction SpecialPointerAuthDiscriminators = 0xcc64 // SpecialPointerAuthDiscriminators = 52324 DiscTaskResumeFunction SpecialPointerAuthDiscriminators = 0x2c42 // SpecialPointerAuthDiscriminators = 11330 DiscTaskResumeContext SpecialPointerAuthDiscriminators = 0x753a // SpecialPointerAuthDiscriminators = 30010 DiscAsyncRunAndBlockFunction SpecialPointerAuthDiscriminators = 0x0f08 // 3848 DiscAsyncContextParent SpecialPointerAuthDiscriminators = 0xbda2 // SpecialPointerAuthDiscriminators = 48546 DiscAsyncContextResume SpecialPointerAuthDiscriminators = 0xd707 // SpecialPointerAuthDiscriminators = 55047 DiscAsyncContextYield SpecialPointerAuthDiscriminators = 0xe207 // SpecialPointerAuthDiscriminators = 57863 DiscCancellationNotificationFunction SpecialPointerAuthDiscriminators = 0x1933 // SpecialPointerAuthDiscriminators = 6451 DiscEscalationNotificationFunction SpecialPointerAuthDiscriminators = 0x5be4 // SpecialPointerAuthDiscriminators = 23524 DiscAsyncThinNullaryFunction SpecialPointerAuthDiscriminators = 0x0f08 // SpecialPointerAuthDiscriminators = 3848 DiscAsyncFutureFunction SpecialPointerAuthDiscriminators = 0x720f // SpecialPointerAuthDiscriminators = 29199 /// Swift async context parameter stored in the extended frame info. DiscSwiftAsyncContextExtendedFrameEntry SpecialPointerAuthDiscriminators = 0xc31a // SpecialPointerAuthDiscriminators = 49946 // C type TaskContinuationFunction* descriminator. DiscClangTypeTaskContinuationFunction SpecialPointerAuthDiscriminators = 0x2abe // SpecialPointerAuthDiscriminators = 10942 /// Dispatch integration. DiscDispatchInvokeFunction SpecialPointerAuthDiscriminators = 0xf493 // SpecialPointerAuthDiscriminators = 62611 /// Functions accessible at runtime (i.e. distributed method accessors). DiscAccessibleFunctionRecord SpecialPointerAuthDiscriminators = 0x438c // = 17292 )
func (SpecialPointerAuthDiscriminators) String ¶ added in v1.1.100
func (i SpecialPointerAuthDiscriminators) String() string
type SpecialProtocol ¶ added in v1.1.177
type SpecialProtocol uint8
/ Identifiers for protocols with special meaning to the Swift runtime.
const ( /// Not a special protocol. /// /// This must be 0 for ABI compatibility with Objective-C protocol_t records. None SpecialProtocol = 0 // none /// The Error protocol. Error SpecialProtocol = 1 // error )
func (SpecialProtocol) String ¶ added in v1.1.177
func (i SpecialProtocol) String() string
type Struct ¶ added in v1.1.167
type Struct struct { TargetStructDescriptor GenericContext *TypeGenericContext ForeignMetadata *TargetForeignMetadataInitialization SingletonMetadata *TargetSingletonMetadataInitialization Metadatas []Metadata CachingOnceToken *TargetCanonicalSpecializedMetadatasCachingOnceToken }
type TOC ¶ added in v1.1.174
type TOC struct { Builtins int Fields int Types int AssociatedTypes int Protocols int ProtocolConformances int }
TOC is a table of contents for Swift contents.
type TargetAccessibleFunctionRecord ¶ added in v1.1.166
type TargetAccessibleFunctionRecord struct { Name RelativeDirectPointer // char * GenericEnvironment RelativeDirectPointer // TargetGenericEnvironment FunctionType RelativeDirectPointer // mangled name Function RelativeDirectPointer // void * Flags AccessibleFunctionFlags }
func (*TargetAccessibleFunctionRecord) Read ¶ added in v1.1.173
func (f *TargetAccessibleFunctionRecord) Read(r io.Reader, addr uint64) error
func (TargetAccessibleFunctionRecord) Size ¶ added in v1.1.173
func (r TargetAccessibleFunctionRecord) Size() int64
type TargetAnonymousContextDescriptor ¶ added in v1.1.166
type TargetAnonymousContextDescriptor struct {
TargetContextDescriptor
}
func (TargetAnonymousContextDescriptor) HasMangledName ¶ added in v1.1.169
func (tacd TargetAnonymousContextDescriptor) HasMangledName() bool
func (*TargetAnonymousContextDescriptor) Read ¶ added in v1.1.169
func (tacd *TargetAnonymousContextDescriptor) Read(r io.Reader, addr uint64) error
func (TargetAnonymousContextDescriptor) Size ¶ added in v1.1.169
func (tacd TargetAnonymousContextDescriptor) Size() int64
type TargetCanonicalSpecializedMetadataAccessorsListEntry ¶ added in v1.1.167
type TargetCanonicalSpecializedMetadataAccessorsListEntry struct {
Accessor RelativeDirectPointer
}
func (*TargetCanonicalSpecializedMetadataAccessorsListEntry) Read ¶ added in v1.1.167
func (f *TargetCanonicalSpecializedMetadataAccessorsListEntry) Read(r io.Reader, addr uint64) error
func (TargetCanonicalSpecializedMetadataAccessorsListEntry) Size ¶ added in v1.1.167
func (f TargetCanonicalSpecializedMetadataAccessorsListEntry) Size() int64
type TargetCanonicalSpecializedMetadatasCachingOnceToken ¶ added in v1.1.166
type TargetCanonicalSpecializedMetadatasCachingOnceToken struct {
Token TargetRelativeDirectPointer
}
func (*TargetCanonicalSpecializedMetadatasCachingOnceToken) Read ¶ added in v1.1.166
func (f *TargetCanonicalSpecializedMetadatasCachingOnceToken) Read(r io.Reader, addr uint64) error
func (TargetCanonicalSpecializedMetadatasCachingOnceToken) Size ¶ added in v1.1.166
func (f TargetCanonicalSpecializedMetadatasCachingOnceToken) Size() int64
type TargetCanonicalSpecializedMetadatasListCount ¶ added in v1.1.166
type TargetCanonicalSpecializedMetadatasListCount struct {
Count uint32
}
type TargetCanonicalSpecializedMetadatasListEntry ¶ added in v1.1.166
type TargetCanonicalSpecializedMetadatasListEntry struct {
Metadata RelativeDirectPointer // TargetMetadata
}
func (*TargetCanonicalSpecializedMetadatasListEntry) Read ¶ added in v1.1.166
func (f *TargetCanonicalSpecializedMetadatasListEntry) Read(r io.Reader, addr uint64) error
func (TargetCanonicalSpecializedMetadatasListEntry) Size ¶ added in v1.1.166
func (f TargetCanonicalSpecializedMetadatasListEntry) Size() int64
type TargetClassDescriptor ¶ added in v1.1.166
type TargetClassDescriptor struct { TargetTypeContextDescriptor // The type of the superclass, expressed as a mangled type name that can // refer to the generic arguments of the subclass type. SuperclassType RelativeDirectPointer // [MetadataNegativeSizeInWords] (uint32) // If this descriptor does not have a resilient superclass, this is the // negative size of metadata objects of this class (in words). // [ResilientMetadataBounds] (TargetRelativeDirectPointer) // If this descriptor has a resilient superclass, this is a reference // to a cache holding the metadata's extents. MetadataNegativeSizeInWordsORResilientMetadataBounds uint32 // UNION // [MetadataPositiveSizeInWords] (uint32) // If this descriptor does not have a resilient superclass, this is the // positive size of metadata objects of this class (in words). // [ExtraClassFlags] (ExtraClassDescriptorFlags) // Otherwise, these flags are used to do things like indicating // the presence of an Objective-C resilient class stub. MetadataPositiveSizeInWordsORExtraClassFlags uint32 // UNION // The number of additional members added by this class to the class // metadata. This data is opaque by default to the runtime, other than // as exposed in other members; it's really just // NumImmediateMembers * sizeof(void*) bytes of data. // // Whether those bytes are added before or after the address point // depends on areImmediateMembersNegative(). NumImmediateMembers uint32 // The number of stored properties in the class, not including its // superclasses. If there is a field offset vector, this is its length. NumFields uint32 // The offset of the field offset vector for this class's stored // properties in its metadata, in words. 0 means there is no field offset vector. // // If this class has a resilient superclass, this offset is relative to // the size of the resilient superclass metadata. Otherwise, it is absolute. FieldOffsetVectorOffset uint32 }
func (TargetClassDescriptor) HasObjCResilientClassStub ¶ added in v1.1.169
func (c TargetClassDescriptor) HasObjCResilientClassStub() bool
func (*TargetClassDescriptor) Read ¶ added in v1.1.166
func (c *TargetClassDescriptor) Read(r io.Reader, addr uint64) error
func (TargetClassDescriptor) Size ¶ added in v1.1.166
func (tcd TargetClassDescriptor) Size() int64
type TargetContextDescriptor ¶ added in v1.1.166
type TargetContextDescriptor struct { Flags ContextDescriptorFlags // Flags describing the context, including its kind and format version. ParentOffset RelativeDirectPointer // The parent context, or null if this is a top-level context. }
TargetContextDescriptor base class for all context descriptors.
func (*TargetContextDescriptor) Read ¶ added in v1.1.166
func (cd *TargetContextDescriptor) Read(r io.Reader, addr uint64) error
func (TargetContextDescriptor) Size ¶ added in v1.1.166
func (cd TargetContextDescriptor) Size() int64
type TargetEnumDescriptor ¶ added in v1.1.166
type TargetEnumDescriptor struct { TargetTypeContextDescriptor NumPayloadCasesAndPayloadSizeOffset uint32 NumEmptyCases uint32 }
func (TargetEnumDescriptor) GetNumCases ¶ added in v1.1.166
func (e TargetEnumDescriptor) GetNumCases() uint32
func (TargetEnumDescriptor) GetNumPayloadCases ¶ added in v1.1.166
func (e TargetEnumDescriptor) GetNumPayloadCases() uint32
func (TargetEnumDescriptor) GetPayloadSizeOffset ¶ added in v1.1.166
func (e TargetEnumDescriptor) GetPayloadSizeOffset() uint32
func (*TargetEnumDescriptor) Read ¶ added in v1.1.166
func (e *TargetEnumDescriptor) Read(r io.Reader, addr uint64) error
func (TargetEnumDescriptor) Size ¶ added in v1.1.166
func (e TargetEnumDescriptor) Size() int64
func (TargetEnumDescriptor) String ¶ added in v1.1.169
func (e TargetEnumDescriptor) String() string
type TargetEnumValueWitnessTable ¶ added in v1.1.177
type TargetEnumValueWitnessTable struct { GetEnumTagFn uint64 DestructiveProjectEnumDataFn uint64 DestructiveInjectEnumTagFn uint64 }
func (*TargetEnumValueWitnessTable) Fixup ¶ added in v1.1.177
func (ew *TargetEnumValueWitnessTable) Fixup(fix func(uint64) uint64)
type TargetExtendedExistentialTypeShape ¶ added in v1.1.169
type TargetExtendedExistentialTypeShape struct { // Flags for the existential shape. Flags ExtendedExistentialTypeShapeFlags // The mangling of the generalized existential type, expressed // (if necessary) in terms of the type parameters of the // generalization signature. // // If this shape is non-unique, this is always a flat string, not a // "symbolic" mangling which can contain relative references. This // allows uniquing to simply compare the string content. // // In principle, the content of the requirement signature and type // expression are derivable from this type. We store them separately // so that code which only needs to work with the logical content of // the type doesn't have to break down the existential type string. // This both (1) allows those operations to work substantially more // efficiently (and without needing code to produce a requirement // signature from an existential type to exist in the runtime) and // (2) potentially allows old runtimes to support new existential // types without as much invasive code. // // The content of this string is *not* necessarily derivable from // the requirement signature. This is because there may be multiple // existential types that have equivalent logical content but which // we nonetheless distinguish at compile time. Storing this also // allows us to far more easily produce a formal type from this // shape reflectively. ExistentialType RelativeDirectPointer // The header describing the requirement signature of the existential. ReqSigHeader RelativeDirectPointer // TargetGenericContextDescriptorHeader }
TargetExtendedExistentialTypeShape a description of the shape of an existential type.
func (*TargetExtendedExistentialTypeShape) Read ¶ added in v1.1.169
func (t *TargetExtendedExistentialTypeShape) Read(r io.Reader, addr uint64) error
func (TargetExtendedExistentialTypeShape) Size ¶ added in v1.1.169
func (t TargetExtendedExistentialTypeShape) Size() int64
func (TargetExtendedExistentialTypeShape) String ¶ added in v1.1.169
func (t TargetExtendedExistentialTypeShape) String() string
type TargetExtensionContextDescriptor ¶ added in v1.1.166
type TargetExtensionContextDescriptor struct { TargetContextDescriptor // A mangling of the `Self` type context that the extension extends. // The mangled name represents the type in the generic context encoded by // this descriptor. For example, a nongeneric nominal type extension will // encode the nominal type name. A generic nominal type extension will encode // the instance of the type with any generic arguments bound. // // Note that the Parent of the extension will be the module context the // extension is declared inside. ExtendedContext RelativeDirectPointer }
func (*TargetExtensionContextDescriptor) Read ¶ added in v1.1.166
func (tmcd *TargetExtensionContextDescriptor) Read(r io.Reader, addr uint64) error
func (TargetExtensionContextDescriptor) Size ¶ added in v1.1.166
func (e TargetExtensionContextDescriptor) Size() int64
type TargetForeignMetadataInitialization ¶ added in v1.1.166
type TargetForeignMetadataInitialization struct {
CompletionFunction RelativeDirectPointer // The completion function. The pattern will always be null.
}
TargetForeignMetadataInitialization is the control structure for performing non-trivial initialization of singleton foreign metadata.
func (*TargetForeignMetadataInitialization) Read ¶ added in v1.1.166
func (f *TargetForeignMetadataInitialization) Read(r io.Reader, addr uint64) error
func (TargetForeignMetadataInitialization) Size ¶ added in v1.1.166
func (f TargetForeignMetadataInitialization) Size() int64
type TargetGenericClassMetadataPattern ¶ added in v1.1.177
type TargetGenericClassMetadataPattern struct { Destroy int32 // The heap-destructor function. IVarDestroyer int32 // The ivar-destructor function. Flags ClassFlags // The class flags. // The following fields are only present in ObjC interop. ClassRODataOffset uint16 // The offset of the class RO-data within the extra data pattern, in words. MetaclassObjectOffset uint16 // The offset of the metaclass object within the extra data pattern, in words. MetaclassRODataOffset uint16 // The offset of the metaclass RO-data within the extra data pattern, in words. Reserved uint16 }
An instantiation pattern for generic class metadata.
type TargetGenericContextDescriptorHeader ¶ added in v1.1.166
type TargetGenericContextDescriptorHeader struct { // The number of (source-written) generic parameters, and thus // the number of GenericParamDescriptors associated with this // context. The parameter descriptors appear in the order in // which they were given in the source. // // A GenericParamDescriptor corresponds to a type metadata pointer // in the arguments layout when isKeyArgument() is true. // isKeyArgument() will be false if the parameter has been made // equivalent to a different parameter or a concrete type. NumParams uint16 // The number of GenericRequirementDescriptors in this generic // signature. // // A GenericRequirementDescriptor of kind Protocol corresponds // to a witness table pointer in the arguments layout when // isKeyArgument() is true. isKeyArgument() will be false if // the protocol is an Objective-C protocol. (Unlike generic // parameters, redundant conformance requirements can simply be // eliminated, and so that case is not impossible.) NumRequirements uint16 // The size of the "key" area of the argument layout, in words. // Key arguments include shape classes, generic parameters and // conformance requirements which are part of the identity of // the context. // // The key area of the argument layout consists of: // // - a sequence of pack lengths, in the same order as the parameter // descriptors which satisfy getKind() == GenericParamKind::TypePack // and hasKeyArgument(); // // - a sequence of metadata or metadata pack pointers, in the same // order as the parameter descriptors which satisfy hasKeyArgument(); // // - a sequence of witness table or witness table pack pointers, in the // same order as the requirement descriptors which satisfy // hasKeyArgument(). // // The elements above which are packs are precisely those appearing // in the sequence of trailing GenericPackShapeDescriptors. NumKeyArguments uint16 // Originally this was the size of the "extra" area of the argument // layout, in words. The idea was that extra arguments would // include generic parameters and conformances that are not part // of the identity of the context; however, it's unclear why we // would ever want such a thing. As a result, in pre-5.8 runtimes // this field is always zero. New flags can only be added as long // as they remains zero in code which must be compatible with // older Swift runtimes. Flags GenericContextDescriptorFlags }
ref: include/swift/ABI/GenericContext.h
func (TargetGenericContextDescriptorHeader) GetNumArguments ¶ added in v1.1.166
func (g TargetGenericContextDescriptorHeader) GetNumArguments() uint16
func (TargetGenericContextDescriptorHeader) HasArguments ¶ added in v1.1.166
func (g TargetGenericContextDescriptorHeader) HasArguments() bool
type TargetGenericEnvironment ¶ added in v1.1.166
type TargetGenericEnvironment struct {
Flags GenericEnvironmentFlags
}
type TargetGenericMetadataInstantiationCache ¶ added in v1.1.166
type TargetGenericMetadataInstantiationCache struct { // Data that the runtime can use for its own purposes. It is guaranteed // to be zero-filled by the compiler. Might be null when building with // -disable-preallocated-instantiation-caches. PrivateData [16]byte }
The instantiation cache for generic metadata. This must be guaranteed to zero-initialized before it is first accessed. Its contents are private to the runtime.
type TargetGenericMetadataPartialPattern ¶ added in v1.1.177
type TargetGenericMetadataPartialPattern struct { Pattern TargetRelativeDirectPointer // A reference to the pattern. The pattern must always be at least word-aligned. OffsetInWords uint16 // The offset into the section into which to copy this pattern, in words. SizeInWords uint16 // The size of the pattern in words. }
TargetGenericMetadataPartialPattern part of a generic metadata instantiation pattern.
type TargetGenericMetadataPattern ¶ added in v1.1.166
type TargetGenericMetadataPattern struct { InstantiationFunction RelativeDirectPointer CompletionFunction RelativeDirectPointer PatternFlags GenericMetadataPatternFlags }
type TargetGenericRequirement ¶ added in v1.1.166
type TargetGenericRequirement struct { TargetGenericRequirementDescriptor Param string Kind string }
type TargetGenericRequirementDescriptor ¶ added in v1.1.166
type TargetGenericRequirementDescriptor struct { Flags GenericRequirementFlags ParamOff RelativeDirectPointer // The type that's constrained, described as a mangled name. TypeOrProtocolOrConformanceOrLayoutOff RelativeIndirectablePointer // UNION: flags determine type }
ref: swift/ABI/Metadata.h - TargetGenericRequirementDescriptor
func (*TargetGenericRequirementDescriptor) Read ¶ added in v1.1.166
func (d *TargetGenericRequirementDescriptor) Read(r io.Reader, addr uint64) error
func (TargetGenericRequirementDescriptor) Size ¶ added in v1.1.166
func (d TargetGenericRequirementDescriptor) Size() int64
type TargetGenericValueMetadataPattern ¶ added in v1.1.177
type TargetGenericValueMetadataPattern struct { /// The value-witness table. Indirectable so that we can re-use tables /// from other libraries if that seems wise. ValueWitnesses RelativeIndirectablePointer }
An instantiation pattern for generic value metadata.
type TargetGenericWitnessTable ¶ added in v1.1.166
type TargetGenericWitnessTable struct { WitnessTableSizeInWords uint16 WitnessTablePrivateSizeInWordsAndRequiresInstantiation uint16 Instantiator int32 PrivateData int32 }
TargetGenericWitnessTable object ref: swift/ABI/Metadata.h - TargetGenericWitnessTable
type TargetMangledContextName ¶ added in v1.1.169
type TargetMangledContextName struct {
Name RelativeDirectPointer
}
func (*TargetMangledContextName) Read ¶ added in v1.1.169
func (m *TargetMangledContextName) Read(r io.Reader, addr uint64) error
func (TargetMangledContextName) Size ¶ added in v1.1.169
func (m TargetMangledContextName) Size() int64
type TargetMetadata ¶ added in v1.1.166
TargetMetadata the common structure of all type metadata.
func (TargetMetadata) GetKind ¶ added in v1.1.177
func (m TargetMetadata) GetKind() MetadataKind
type TargetMethodDescriptor ¶ added in v1.1.166
type TargetMethodDescriptor struct { Flags MethodDescriptorFlags Impl TargetRelativeDirectPointer }
func (*TargetMethodDescriptor) Read ¶ added in v1.1.169
func (md *TargetMethodDescriptor) Read(r io.Reader, addr uint64) error
func (TargetMethodDescriptor) Size ¶ added in v1.1.169
func (md TargetMethodDescriptor) Size() int64
type TargetMethodOverrideDescriptor ¶ added in v1.1.166
type TargetMethodOverrideDescriptor struct { // The class containing the base method. Class RelativeDirectPointer // The base method. Method RelativeDirectPointer // The implementation of the override. Impl RelativeDirectPointer // UNION }
An entry in the method override table, referencing a method from one of our ancestor classes, together with an implementation.
func (*TargetMethodOverrideDescriptor) Read ¶ added in v1.1.167
func (mod *TargetMethodOverrideDescriptor) Read(r io.Reader, addr uint64) error
func (TargetMethodOverrideDescriptor) Size ¶ added in v1.1.167
func (mod TargetMethodOverrideDescriptor) Size() int64
func (TargetMethodOverrideDescriptor) String ¶ added in v1.1.169
func (mod TargetMethodOverrideDescriptor) String() string
type TargetModuleContext ¶ added in v1.1.166
type TargetModuleContext struct { TargetModuleContextDescriptor Name string Parent string }
type TargetModuleContextDescriptor ¶ added in v1.1.166
type TargetModuleContextDescriptor struct { TargetContextDescriptor NameOffset RelativeDirectPointer }
func (*TargetModuleContextDescriptor) Read ¶ added in v1.1.166
func (tmcd *TargetModuleContextDescriptor) Read(r io.Reader, addr uint64) error
func (TargetModuleContextDescriptor) Size ¶ added in v1.1.166
func (tmc TargetModuleContextDescriptor) Size() int64
type TargetNonUniqueExtendedExistentialTypeShape ¶ added in v1.1.168
type TargetNonUniqueExtendedExistentialTypeShape struct { // A reference to memory that can be used to cache a globally-unique // descriptor for this existential shape. UniqueCache RelativeDirectPointer // TargetExtendedExistentialTypeShape // The local copy of the existential shape descriptor. LocalCopy TargetExtendedExistentialTypeShape // TargetExtendedExistentialTypeShape }
TargetNonUniqueExtendedExistentialTypeShape a descriptor for an extended existential type descriptor which needs to be uniqued at runtime.
func (*TargetNonUniqueExtendedExistentialTypeShape) Read ¶ added in v1.1.169
func (t *TargetNonUniqueExtendedExistentialTypeShape) Read(r io.Reader, addr uint64) error
func (TargetNonUniqueExtendedExistentialTypeShape) Size ¶ added in v1.1.169
func (t TargetNonUniqueExtendedExistentialTypeShape) Size() int64
type TargetObjCResilientClassStubInfo ¶ added in v1.1.166
type TargetObjCResilientClassStubInfo struct { // A relative pointer to an Objective-C resilient class stub. // // We do not declare a struct type for class stubs since the Swift runtime // does not need to interpret them. The class stub struct is part of // the Objective-C ABI, and is laid out as follows: // - isa pointer, always 1 // - an update callback, of type 'Class (*)(Class *, objc_class_stub *)' // // Class stubs are used for two purposes: // // - Objective-C can reference class stubs when calling static methods. // - Objective-C and Swift can reference class stubs when emitting // categories (in Swift, extensions with @objc members). Stub TargetRelativeDirectPointer }
TargetObjCResilientClassStubInfo structure that stores a reference to an Objective-C class stub.
This is not the class stub itself; it is part of a class context descriptor.
func (*TargetObjCResilientClassStubInfo) Read ¶ added in v1.1.167
func (t *TargetObjCResilientClassStubInfo) Read(r io.Reader, addr uint64) error
func (TargetObjCResilientClassStubInfo) Size ¶ added in v1.1.167
func (t TargetObjCResilientClassStubInfo) Size() int64
type TargetOpaqueTypeDescriptor ¶ added in v1.1.166
type TargetOpaqueTypeDescriptor struct {
TargetContextDescriptor
}
TargetOpaqueTypeDescriptor the descriptor for an opaque type.
func (*TargetOpaqueTypeDescriptor) Read ¶ added in v1.1.169
func (otd *TargetOpaqueTypeDescriptor) Read(r io.Reader, addr uint64) error
func (TargetOpaqueTypeDescriptor) Size ¶ added in v1.1.169
func (otd TargetOpaqueTypeDescriptor) Size() int64
type TargetOverrideTableHeader ¶ added in v1.1.166
type TargetOverrideTableHeader struct { // The number of MethodOverrideDescriptor records following the vtable // override header in the class's nominal type descriptor. NumEntries uint32 }
Header for a class vtable override descriptor. This is a variable-sized structure that provides implementations for overrides of methods defined in superclasses.
type TargetProtocolConformanceDescriptor ¶ added in v1.1.166
type TargetProtocolConformanceDescriptor struct { ProtocolOffsest RelativeIndirectablePointer // The protocol being conformed to. TypeRefOffsest RelativeIndirectablePointer // Some description of the type that conforms to the protocol. WitnessTablePatternOffsest RelativeDirectPointer // The witness table pattern, which may also serve as the witness table. Flags ConformanceFlags // Various flags, including the kind of conformance. }
TargetProtocolConformanceDescriptor the structure of a protocol conformance.
func (*TargetProtocolConformanceDescriptor) Read ¶ added in v1.1.166
func (d *TargetProtocolConformanceDescriptor) Read(r io.Reader, addr uint64) error
func (TargetProtocolConformanceDescriptor) Size ¶ added in v1.1.166
func (d TargetProtocolConformanceDescriptor) Size() int64
type TargetProtocolDescriptor ¶ added in v1.1.166
type TargetProtocolDescriptor struct { TargetContextDescriptor NameOffset RelativeDirectPointer // The name of the protocol. NumRequirementsInSignature uint32 // The number of generic requirements in the requirement signature of the protocol. NumRequirements uint32 /* The number of requirements in the protocol. If any requirements beyond MinimumWitnessTableSizeInWords are present * in the witness table template, they will be not be overwritten with defaults. */ AssociatedTypeNamesOffset RelativeDirectPointer // Associated type names, as a space-separated list in the same order as the requirements. }
TargetProtocolDescriptor ref: include/swift/ABI/MetadataValues.h
func (*TargetProtocolDescriptor) Read ¶ added in v1.1.166
func (d *TargetProtocolDescriptor) Read(r io.Reader, addr uint64) error
func (TargetProtocolDescriptor) Size ¶ added in v1.1.166
func (d TargetProtocolDescriptor) Size() int64
type TargetProtocolRecord ¶ added in v1.1.166
type TargetProtocolRecord struct {
Protocol int32 // The protocol referenced (the remaining low bit is reserved for future use)
}
TargetProtocolRecord the structure of a protocol reference record. ref: swift/ABI/Metadata.h
type TargetProtocolRequirement ¶ added in v1.1.166
type TargetProtocolRequirement struct { Flags ProtocolRequirementFlags DefaultImplementation RelativeDirectPointer // The optional default implementation of the protocol. }
TargetProtocolRequirement protocol requirement descriptor. This describes a single protocol requirement in a protocol descriptor. The index of the requirement in the descriptor determines the offset of the witness in a witness table for this protocol. ref: swift/ABI/Metadata.h - TargetProtocolRequirement
func (*TargetProtocolRequirement) Read ¶ added in v1.1.166
func (pr *TargetProtocolRequirement) Read(r io.Reader, addr uint64) error
func (TargetProtocolRequirement) Size ¶ added in v1.1.166
func (pr TargetProtocolRequirement) Size() int64
type TargetRelativeDirectPointer ¶ added in v1.1.166
func (TargetRelativeDirectPointer) GetAddress ¶ added in v1.1.166
func (tr TargetRelativeDirectPointer) GetAddress(r io.Reader) (uint64, error)
func (TargetRelativeDirectPointer) GetRelPtrAddress ¶ added in v1.1.166
func (tr TargetRelativeDirectPointer) GetRelPtrAddress() uint64
func (TargetRelativeDirectPointer) IsSet ¶ added in v1.1.166
func (tr TargetRelativeDirectPointer) IsSet() bool
type TargetResilientClassMetadataPattern ¶ added in v1.1.177
type TargetResilientClassMetadataPattern struct { /// A function that allocates metadata with the correct size at runtime. /// /// If this is null, the runtime instead calls swift_relocateClassMetadata(), /// passing in the class descriptor and this pattern. RelocationFunction int32 /// The heap-destructor function. Destroy int32 /// The ivar-destructor function. IVarDestroyer int32 // The class flags. Flags ClassFlags /// Our ClassROData. Data int32 /// Our metaclass. Metaclass int32 }
An instantiation pattern for non-generic resilient class metadata.
Used for classes with resilient ancestry, that is, where at least one ancestor is defined in a different resilience domain.
The hasResilientSuperclass() flag in the class context descriptor is set in this case, and hasSingletonMetadataInitialization() must be set as well.
The pattern is referenced from the SingletonMetadataInitialization record in the class context descriptor.
type TargetResilientSuperclass ¶ added in v1.1.166
type TargetResilientSuperclass struct { // The superclass of this class. This pointer can be interpreted // using the superclass reference kind stored in the type context // descriptor flags. It is null if the class has no formal superclass. // // Note that SwiftObject, the implicit superclass of all Swift root // classes when building with ObjC compatibility, does not appear here. Superclass RelativeDirectPointer }
func (*TargetResilientSuperclass) Read ¶ added in v1.1.167
func (t *TargetResilientSuperclass) Read(r io.Reader, addr uint64) error
func (TargetResilientSuperclass) Size ¶ added in v1.1.167
func (t TargetResilientSuperclass) Size() int64
type TargetResilientWitness ¶ added in v1.1.166
type TargetResilientWitness struct { RequirementOff RelativeIndirectablePointer ImplOff RelativeDirectPointer }
TargetResilientWitness object ref: swift/ABI/Metadata.h - TargetResilientWitness
func (*TargetResilientWitness) Read ¶ added in v1.1.166
func (rw *TargetResilientWitness) Read(r io.Reader, addr uint64) error
func (TargetResilientWitness) Size ¶ added in v1.1.166
func (rw TargetResilientWitness) Size() int64
type TargetResilientWitnessesHeader ¶ added in v1.1.166
type TargetResilientWitnessesHeader struct {
NumWitnesses uint32
}
TargetResilientWitnessesHeader a header containing information about the resilient witnesses in a protocol conformance descriptor. ref: swift/ABI/Metadata.h - TargetResilientWitnessesHeader
type TargetSingletonMetadataInitialization ¶ added in v1.1.166
type TargetSingletonMetadataInitialization struct { InitializationCacheOffset TargetRelativeDirectPointer // The initialization cache. Out-of-line because mutable. IncompleteMetadata TargetRelativeDirectPointer // UNION: The incomplete metadata, for structs, enums and classes without resilient ancestry. // ResilientPattern // If the class descriptor's hasResilientSuperclass() flag is set, // this field instead points at a pattern used to allocate and // initialize metadata for this class, since it's size and contents // is not known at compile time. CompletionFunction TargetRelativeDirectPointer // The completion function. The pattern will always be null, even for a resilient class. }
func (*TargetSingletonMetadataInitialization) Read ¶ added in v1.1.166
func (s *TargetSingletonMetadataInitialization) Read(r io.Reader, addr uint64) error
func (TargetSingletonMetadataInitialization) Size ¶ added in v1.1.166
func (s TargetSingletonMetadataInitialization) Size() int64
type TargetStructDescriptor ¶ added in v1.1.166
type TargetStructDescriptor struct { TargetTypeContextDescriptor // The number of stored properties in the struct. // If there is a field offset vector, this is its length. NumFields uint32 // The offset of the field offset vector for this struct's stored // properties in its metadata, if any. 0 means there is no field offset vector. FieldOffsetVectorOffset uint32 }
func (*TargetStructDescriptor) Read ¶ added in v1.1.166
func (s *TargetStructDescriptor) Read(r io.Reader, addr uint64) error
func (TargetStructDescriptor) Size ¶ added in v1.1.166
func (s TargetStructDescriptor) Size() int64
type TargetTypeContextDescriptor ¶ added in v1.1.166
type TargetTypeContextDescriptor struct { TargetContextDescriptor NameOffset RelativeDirectPointer // The name of the type. AccessFunctionPtr RelativeDirectPointer // A pointer to the metadata access function for this type. FieldsOffset RelativeDirectPointer // A pointer to the field descriptor for the type, if any. }
TargetTypeContextDescriptor object
func (*TargetTypeContextDescriptor) Read ¶ added in v1.1.166
func (tcd *TargetTypeContextDescriptor) Read(r io.Reader, addr uint64) error
func (TargetTypeContextDescriptor) Size ¶ added in v1.1.166
func (tcd TargetTypeContextDescriptor) Size() int64
type TargetTypeGenericContextDescriptorHeader ¶ added in v1.1.166
type TargetTypeGenericContextDescriptorHeader struct { InstantiationCache RelativeDirectPointer DefaultInstantiationPattern RelativeDirectPointer Base TargetGenericContextDescriptorHeader }
func (*TargetTypeGenericContextDescriptorHeader) Read ¶ added in v1.1.166
func (h *TargetTypeGenericContextDescriptorHeader) Read(r io.Reader, addr uint64) error
func (TargetTypeGenericContextDescriptorHeader) Size ¶ added in v1.1.166
func (h TargetTypeGenericContextDescriptorHeader) Size() int64
type TargetTypeMetadataHeader ¶ added in v1.1.177
type TargetVTableDescriptorHeader ¶ added in v1.1.166
type TargetValueMetadata ¶ added in v1.1.177
type TargetValueMetadata struct {
Description uint64 // An out-of-line description of the type. (signed pointer to TargetValueTypeDescriptor)
}
type TargetValueTypeDescriptor ¶ added in v1.1.177
type TargetValueTypeDescriptor TargetTypeContextDescriptor
type TargetValueWitnessFlags ¶ added in v1.1.177
type TargetValueWitnessFlags uint32
TargetValueWitnessFlags flags stored in the value-witness table.
const ( AlignmentMask TargetValueWitnessFlags = 0x000000FF // unused 0x0000FF00 IsNonPOD TargetValueWitnessFlags = 0x00010000 IsNonInline TargetValueWitnessFlags = 0x00020000 // unused 0x00040000 HasSpareBits TargetValueWitnessFlags = 0x00080000 IsNonBitwiseTakable TargetValueWitnessFlags = 0x00100000 HasEnumWitnesses TargetValueWitnessFlags = 0x00200000 Incomplete TargetValueWitnessFlags = 0x00400000 IsNonCopyable TargetValueWitnessFlags = 0x00800000 // unused 0xFF000000 TVWFMaxNumExtraInhabitants = 0x7FFFFFFF )
The polarity of these bits is chosen so that, when doing struct layout, the flags of the field types can be mostly bitwise-or'ed together to derive the flags for the struct. (The "non-inline" and "has-extra-inhabitants" bits still require additional fixup.)
type TargetValueWitnessTable ¶ added in v1.1.177
type TargetValueWitnessTable struct { InitializeBufferWithCopyOfBufferFn uint64 DestroyFn uint64 InitializeWithCopyFn uint64 AssignWithCopyFn uint64 InitializeWithTakeFn uint64 AssignWithTakeFn uint64 GetEnumTagSinglePayloadFn uint64 StoreEnumTagSinglePayloadFn uint64 Size uint64 // the size of this type. Unlike in C, this has not been padded up to the alignment; that value is maintained as 'stride'. Stride uint64 // This is the size rounded up to be a multiple of the alignment. WitnessFlags TargetValueWitnessFlags ExtraInhabitantCount uint32 // The number of extra inhabitants, that is, bit patterns that do not form valid values of the type, in this type's binary representation. }
TargetValueWitnessTable a value-witness table. A value witness table is built around the requirements of some specific type. The information in a value-witness table is intended to be sufficient to lay out and manipulate values of an arbitrary type.
func (*TargetValueWitnessTable) Fixup ¶ added in v1.1.177
func (t *TargetValueWitnessTable) Fixup(fix func(uint64) uint64)
func (TargetValueWitnessTable) Flags ¶ added in v1.1.177
func (t TargetValueWitnessTable) Flags() string
func (TargetValueWitnessTable) GetAlignment ¶ added in v1.1.177
func (t TargetValueWitnessTable) GetAlignment() uint32
func (TargetValueWitnessTable) HasEnumWitnesses ¶ added in v1.1.177
func (t TargetValueWitnessTable) HasEnumWitnesses() bool
func (TargetValueWitnessTable) IsBitwiseTakable ¶ added in v1.1.177
func (t TargetValueWitnessTable) IsBitwiseTakable() bool
func (TargetValueWitnessTable) IsCopyable ¶ added in v1.1.177
func (t TargetValueWitnessTable) IsCopyable() bool
func (TargetValueWitnessTable) IsIncomplete ¶ added in v1.1.177
func (t TargetValueWitnessTable) IsIncomplete() bool
func (TargetValueWitnessTable) IsInlineStorage ¶ added in v1.1.177
func (t TargetValueWitnessTable) IsInlineStorage() bool
func (TargetValueWitnessTable) IsPOD ¶ added in v1.1.177
func (t TargetValueWitnessTable) IsPOD() bool
func (TargetValueWitnessTable) IsValueInline ¶ added in v1.1.177
func (t TargetValueWitnessTable) IsValueInline() bool
type TargetWitnessTable ¶ added in v1.1.166
type TargetWitnessTable struct { /// The protocol conformance descriptor from which this witness table /// was generated. Description int32 }
A witness table for a protocol.
With the exception of the initial protocol conformance descriptor, the layout of a witness table is dependent on the protocol being represented.
type Type ¶ added in v1.1.166
type Type struct { Address uint64 Parent *Type Name string ImportInfo string Kind ContextDescriptorKind AccessFunction uint64 Fields *Field Type any Size int64 }
func (Type) IsCImportedModuleName ¶ added in v1.1.166
type TypeContextDescriptorFlags ¶ added in v1.1.166
type TypeContextDescriptorFlags uint16
func (TypeContextDescriptorFlags) AreImmediateMembersNegative ¶ added in v1.1.166
func (f TypeContextDescriptorFlags) AreImmediateMembersNegative() bool
func (TypeContextDescriptorFlags) HasCanonicalMetadataPrespecializations ¶ added in v1.1.166
func (f TypeContextDescriptorFlags) HasCanonicalMetadataPrespecializations() bool
func (TypeContextDescriptorFlags) HasImportInfo ¶ added in v1.1.166
func (f TypeContextDescriptorFlags) HasImportInfo() bool
func (TypeContextDescriptorFlags) HasLayoutString ¶ added in v1.1.177
func (f TypeContextDescriptorFlags) HasLayoutString() bool
func (TypeContextDescriptorFlags) HasOverrideTable ¶ added in v1.1.166
func (f TypeContextDescriptorFlags) HasOverrideTable() bool
func (TypeContextDescriptorFlags) HasResilientSuperclass ¶ added in v1.1.166
func (f TypeContextDescriptorFlags) HasResilientSuperclass() bool
func (TypeContextDescriptorFlags) HasVTable ¶ added in v1.1.166
func (f TypeContextDescriptorFlags) HasVTable() bool
func (TypeContextDescriptorFlags) IsActor ¶ added in v1.1.166
func (f TypeContextDescriptorFlags) IsActor() bool
func (TypeContextDescriptorFlags) IsDefaultActor ¶ added in v1.1.166
func (f TypeContextDescriptorFlags) IsDefaultActor() bool
func (TypeContextDescriptorFlags) MetadataInitialization ¶ added in v1.1.166
func (f TypeContextDescriptorFlags) MetadataInitialization() MetadataInitializationKind
func (TypeContextDescriptorFlags) ResilientSuperclassReferenceKind ¶ added in v1.1.166
func (f TypeContextDescriptorFlags) ResilientSuperclassReferenceKind() TypeReferenceKind
func (TypeContextDescriptorFlags) String ¶ added in v1.1.166
func (f TypeContextDescriptorFlags) String() string
type TypeGenericContext ¶ added in v1.1.169
type TypeGenericContext struct { TargetTypeGenericContextDescriptorHeader GenericMetadataPattern *GenericMetadataPattern Parameters []GenericParamDescriptor Requirements []TargetGenericRequirement TypePacks []GenericPackShapeDescriptor }
type TypeReferenceKind ¶ added in v1.1.166
type TypeReferenceKind uint8
TypeReferenceKind kinds of type metadata/protocol conformance records.
const ( //The conformance is for a nominal type referenced directly; getTypeDescriptor() points to the type context descriptor. DirectTypeDescriptor TypeReferenceKind = 0x00 // direct // The conformance is for a nominal type referenced indirectly; getTypeDescriptor() points to the type context descriptor. IndirectTypeDescriptor TypeReferenceKind = 0x01 // indirect // The conformance is for an Objective-C class that should be looked up by class name. DirectObjCClassName TypeReferenceKind = 0x02 // direct_objc_class // The conformance is for an Objective-C class that has no nominal type descriptor. // getIndirectObjCClass() points to a variable that contains the pointer to // the class object, which then requires a runtime call to get metadata. // // On platforms without Objective-C interoperability, this case is unused. IndirectObjCClass TypeReferenceKind = 0x03 // indirect_objc_class // We only reserve three bits for this in the various places we store it. FirstKind = DirectTypeDescriptor LastKind = IndirectObjCClass )
func (TypeReferenceKind) String ¶ added in v1.1.166
func (i TypeReferenceKind) String() string
type VTable ¶ added in v1.1.166
type VTable struct { TargetVTableDescriptorHeader Methods []Method }
type ValueWitnessTable ¶ added in v1.1.100
type ValueWitnessTable struct { RelativeDirectPointer TargetValueWitnessTable EnumWitnessTable *TargetEnumValueWitnessTable }
Source Files ¶
- accessible_funcs.go
- associated_type.go
- builtin_type.go
- capture.go
- capture_string.go
- field.go
- field_string.go
- mangling.go
- metadata.go
- metadata_string.go
- multi_payload_enum.go
- protocols.go
- protocols_string.go
- relative_pointer.go
- replacements.go
- swift.go
- swift_string.go
- type_anon.go
- type_class.go
- type_enum.go
- type_ext.go
- type_mod.go
- type_struct.go
- types.go
- types_string.go