fields

package
v1.1.105 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const SWIFT_REFLECTION_METADATA_VERSION = 3 // superclass field

Variables

This section is empty.

Functions

This section is empty.

Types

type FDHeader added in v1.1.100

type FDHeader struct {
	MangledTypeNameOffset int32
	SuperclassOffset      int32
	Kind                  FieldDescriptorKind
	FieldRecordSize       uint16
	NumFields             uint32
}

type Field

type Field struct {
	Address     uint64
	MangledType string
	SuperClass  string
	Kind        string
	Records     []FieldRecord
	Offset      int64
	Descriptor  FieldDescriptor
}

func (Field) IsClass

func (f Field) IsClass() bool

func (Field) IsEnum

func (f Field) IsEnum() bool

func (Field) IsProtocol

func (f Field) IsProtocol() bool

func (Field) String added in v1.1.101

func (f Field) String() string

type FieldDescriptor

type FieldDescriptor struct {
	FDHeader
	FieldRecords []FieldRecordType
}

type FieldDescriptorKind added in v1.1.100

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.100

func (i FieldDescriptorKind) String() string

type FieldRecord added in v1.1.100

type FieldRecord struct {
	Name        string
	MangledType string
	Flags       string
}

type FieldRecordFlags added in v1.1.100

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) String added in v1.1.100

func (i FieldRecordFlags) String() string

type FieldRecordType added in v1.1.100

type FieldRecordType struct {
	Flags                 FieldRecordFlags
	MangledTypeNameOffset int32
	FieldNameOffset       int32
}

Jump to

Keyboard shortcuts

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