protocols

package
v0.0.0-...-b52216c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 12, 2022 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UnusedLowBits conformanceFlag = 0x07 // historical conformance kind

	TypeMetadataKindMask  conformanceFlag = 0x7 << 3 // 8 type reference kinds
	TypeMetadataKindShift conformanceFlag = 3

	IsRetroactiveMask          conformanceFlag = 0x01 << 6
	IsSynthesizedNonUniqueMask conformanceFlag = 0x01 << 7

	NumConditionalRequirementsMask  conformanceFlag = 0xFF << 8
	NumConditionalRequirementsShift conformanceFlag = 8

	HasResilientWitnessesMask  conformanceFlag = 0x01 << 16
	HasGenericWitnessTableMask conformanceFlag = 0x01 << 17
)
View Source
const (
	// The conformance is for a nominal type referenced directly;
	// getTypeDescriptor() points to the type context descriptor.
	DirectTypeDescriptor referenceKind = 0x00

	// The conformance is for a nominal type referenced indirectly;
	// getTypeDescriptor() points to the type context descriptor.
	IndirectTypeDescriptor referenceKind = 0x01

	// The conformance is for an Objective-C class that should be looked up
	// by class name.
	DirectObjCClassName referenceKind = 0x02

	// 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 referenceKind = 0x03
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ConformanceDescriptor

type ConformanceDescriptor struct {
	ProtocolDescriptor    int32
	NominalTypeDescriptor int32
	ProtocolWitnessTable  int32
	ConformanceFlags      conformanceFlag
}

ConformanceDescriptor in __TEXT.__swift5_proto This section contains an array of 32-bit signed integers. Each integer is a relative offset that points to a protocol conformance descriptor in the __TEXT.__const section.

type Descriptor

type Descriptor struct {
	Flags                      uint32
	Parent                     int32
	Name                       int32
	NumRequirementsInSignature uint32
	NumRequirements            uint32
	AssociatedTypeNames        int32
}

Descriptor in __TEXT.__swift5_protos This section contains an array of 32-bit signed integers. Each integer is a relative offset that points to a protocol descriptor in the __TEXT.__const section.

type Protocol

type Protocol struct {
	Name   string
	Parent *Protocol
	Descriptor
}

Protocol swift protocol object

type TargetGenericRequirementDescriptor

type TargetGenericRequirementDescriptor struct {
	Flags uint32
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL