package
1.1.245
Repository: https://github.com/blacktop/go-macho.git
Documentation: pkg.go.dev

# README

swift

TODO

Sections

  • __swift5_entry
  • __swift5_builtin
  • __swift5_reflstr
  • __swift5_fieldmd
  • __swift5_assocty
  • __swift5_proto
  • __swift5_types
  • __swift5_types2 // the section containing additional type references
  • [?] __swift5_typeref
  • __swift5_protos
  • __swift5_capture
  • __swift5_replace
  • __swift5_replac2
  • __swift5_acfuncs
  • __swift5_mpenum ?? check Foundation
  • __constg_swiftt
  • __textg_swiftm

Protocol Conformances

  • parse witness tables (I got the patterns, but there's data after the description ptr (looks like func ptrs))

Type (Conformances)

  • add type's protocol conformances to their output (will require caching/looking up type names etc)

Protocols

  • properly represent signature requirements (I believe if they are key_args they belong in PROT<A: proto, A: proto> etc)

Metadata

  • parse all the different type's metatdata

Demangle (hard)

  • pure Go Swift demangler
  • symbolic mangled type algorithm + demangler

# Constants

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.
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.
Bit used to indicate that an associated type witness is a pointer to a mangled name (vs.
No description provided by the author
The name of the Builtin module, which contains Builtin functions.
The name of the Builtin type for BridgeObject.
The name of the Builtin type for IEEE Floating point types.
The name of the builtin type for power pc specific floating point types.
The name of the Builtin type for Int.
The name of the Builtin type for Int128.
The name of the Builtin type for Int16.
The name of the Builtin type for Int256.
The name of the Builtin type for Int32.
The name of the Builtin type for Int512.
The name of the Builtin type for Int64.
The name of the Builtin type for Int8.
The name of the Builtin type for IntLiteral.
The name of the Builtin type for NativeObject.
The name of the Builtin type prefix.
The name of the Builtin type for RawPointer.
The name of the Builtin type for SILToken.
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.
The name of the Builtin type for UnsafeValueBuffer.
The name of the Builtin type for Vector.
The name of the Builtin type for Word.
anonymous.
class.
enum.
extension.
module.
opaque_type.
protocol.
struct.
type_first.
type_last.
The name of the clang imported header module.
Whether the immediate class members in this metadata are allocated at negative offsets.
Does this pattern have an immediate-members pattern?.
Set if the context descriptor includes metadata for dynamically installing method overrides at metadata instantiation time.
Set if the context descriptor is for a class with resilient ancestry.
Set if the context descriptor includes metadata for dynamically constructing a class's vtables at metadata instantiation time.
Set if the class is an actor.
Set if the class is a default actor class.
The kind of reference that this class makes to its resilient superclass descriptor.
No description provided by the author
class.
The name prefix for C++ template instantiation imported as a Swift struct.
direct_objc_class.
direct.
= 17292.
No description provided by the author
No description provided by the author
SpecialPointerAuthDiscriminators = 48546.
SpecialPointerAuthDiscriminators = 55047.
SpecialPointerAuthDiscriminators = 57863.
SpecialPointerAuthDiscriminators = 29199.
3848.
SpecialPointerAuthDiscriminators = 3848.
SpecialPointerAuthDiscriminators = 48288.
SpecialPointerAuthDiscriminators = 6451.
SpecialPointerAuthDiscriminators = 10942.
SpecialPointerAuthDiscriminators = 39579.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
SpecialPointerAuthDiscriminators = 62611.
SpecialPointerAuthDiscriminators = 11389.
SpecialPointerAuthDiscriminators = 18672.
SpecialPointerAuthDiscriminators = 23524.
SpecialPointerAuthDiscriminators = 23101.
SpecialPointerAuthDiscriminators = 8955.
No description provided by the author
No description provided by the author
No description provided by the author
HeapMetadataHeader::destroy.
No description provided by the author
No description provided by the author
No description provided by the author
Value witness functions.
No description provided by the author
No description provided by the author
SpecialPointerAuthDiscriminators = 52324.
No description provided by the author
KeyPath metadata functions.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
SpecialPointerAuthDiscriminators = 59288.
ObjC class pointers.
No description provided by the author
SpecialPointerAuthDiscriminators = 12739.
No description provided by the author
Resume functions for yield-once coroutines that yield a single opaque borrowed/inout value.
Protocol conformance descriptors.
Resilient class stub initializer callback.
Runtime function variables exported by the runtime.
No description provided by the author
No description provided by the author
SpecialPointerAuthDiscriminators = 49946.
SpecialPointerAuthDiscriminators = 30010.
SpecialPointerAuthDiscriminators = 11330.
Type descriptor data pointers.
Pointer to value witness table stored in type metadata.
No description provided by the author
No description provided by the author
enum.
error.
error object.
existential.
existential metatype.
extended existential type.
No description provided by the author
No description provided by the author
class.
class protocol.
enum.
multi-payload enum.
objc class.
objc protocol.
protocol.
struct.
We only reserve three bits for this in the various places we store it.
foreign class.
foreign reference type.
function.
max.
metadata.
type.
type_pack.
witness-table.
base-class.
layout.
protocol.
same-conformance.
same-type.
same-shape.
class.
Set if the type descriptor has a pointer to a list of canonical prespecializations.
Whether this protocol is class-constrained.
No description provided by the author
Has this class a custom name, specified with the @objc attribute?.
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.
Does this pattern have an extra-data pattern?.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Set if the type has extended import information.
Set if the metadata contains a pointer to a layout string.
Whether this anonymous context descriptor is followed by its mangled name, which can be used to match the descriptor at runtime.
Set if the context descriptor includes a pointer to an Objective-C resilient class stub structure.
No description provided by the author
unused 0x00040000.
No description provided by the author
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?.
No description provided by the author
No description provided by the author
heap generic local variable.
heap local variable.
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.
indirect_objc_class.
indirect.
IsArtificial is this an artificial field?.
No description provided by the author
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.
No description provided by the author
IsIndirectCase is this an indirect enum case?.
No description provided by the author
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 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 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.
unused 0x0000FF00.
Whether this protocol is resilient.
No description provided by the author
Whether this metadata is a specialization of a generic metadata pattern which was created during compilation.
Is this a Swift class from the Darwin pre-stable ABI? This bit is clear in stable ABI Swift classes.
No description provided by the author
IsVar is this a mutable `var` property?.
job.
16 kinds should be enough for anybody.
The largest possible non-isa-pointer metadata kind value.
No description provided by the author
The prefix of module names used by LLDB to capture Swift expressions.
The name of the fake module used to hold synthesized ClangImporter things.
The name of the fake module used to hold imported Objective-C things.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
foreign.
Whether there's something unusual about how the metadata is initialized.
No description provided by the author
none.
singleton.
Non-heap metadata kinds have this bit set.
Non-type metadata kinds have this bit set.
The above two flags are negative because the "class" kind has to be zero, and class metadata is both type and heap metadata.
metatype.
none.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
objc class wrapper.
opaque.
optional.
No description provided by the author
associated conformance access function.
associated type access function.
base protocol.
getter.
initializer.
method.
modify coroutine.
read coroutine.
setter.
No description provided by the author
class.
explicit layout.
metatype.
none.
No description provided by the author
No description provided by the author
Special protocol value.
No description provided by the author
The name of the standard library, which is a reserved module name.
struct.
The name of the Onone support library, which is a reserved module name.
superclass field.
The name of the SwiftShims module, which contains private stdlib decls.
task.
tuple.
unused 0xFF000000.
8 type reference kinds.
No description provided by the author
historical conformance kind.
Does this class use Swift refcounting?.
For value metadata: the metadata kind of the type.
No description provided by the author

# Variables

No description provided by the author
No description provided by the author
MangledType is a mangled type map.

# Structs

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
AssociatedTypeDescriptor an associated type descriptor contains a collection of associated type records for a conformance.
AssociatedTypeRecord type records describe the mapping from an associated type to the type witness of a conformance.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
BuiltinType builtin swift type.
BuiltinTypeDescriptor type records describe basic layout information about any builtin types referenced from the other sections.
No description provided by the author
CaptureDescriptor describe the layout of a closure context object.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
FieldDescriptor contain a collection of field records for a single class, struct or enum declaration.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
GenericPackShapeDescriptor the GenericPackShapeHeader is followed by an array of these descriptors, whose length is given by the header's NumPacks field.
GenericPackShapeHeader object ref: swift/ABI/GenericContext.h - GenericPackShapeHeader.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
ref: include/swift/RemoteInspection/Records.h.
No description provided by the author
No description provided by the author
No description provided by the author
Protocol swift protocol object.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
TargetContextDescriptor base class for all context descriptors.
No description provided by the author
No description provided by the author
TargetExtendedExistentialTypeShape a description of the shape of an existential type.
No description provided by the author
TargetForeignMetadataInitialization is the control structure for performing non-trivial initialization of singleton foreign metadata.
An instantiation pattern for generic class metadata.
ref: include/swift/ABI/GenericContext.h.
No description provided by the author
The instantiation cache for generic metadata.
TargetGenericMetadataPartialPattern part of a generic metadata instantiation pattern.
No description provided by the author
No description provided by the author
ref: swift/ABI/Metadata.h - TargetGenericRequirementDescriptor.
An instantiation pattern for generic value metadata.
TargetGenericWitnessTable object ref: swift/ABI/Metadata.h - TargetGenericWitnessTable.
No description provided by the author
TargetMetadata the common structure of all type metadata.
No description provided by the author
An entry in the method override table, referencing a method from one of our ancestor classes, together with an implementation.
No description provided by the author
No description provided by the author
TargetNonUniqueExtendedExistentialTypeShape a descriptor for an extended existential type descriptor which needs to be uniqued at runtime.
TargetObjCResilientClassStubInfo structure that stores a reference to an Objective-C class stub.
TargetOpaqueTypeDescriptor the descriptor for an opaque type.
Header for a class vtable override descriptor.
TargetProtocolConformanceDescriptor the structure of a protocol conformance.
TargetProtocolDescriptor ref: include/swift/ABI/MetadataValues.h.
TargetProtocolRecord the structure of a protocol reference record.
TargetProtocolRequirement protocol requirement descriptor.
No description provided by the author
An instantiation pattern for non-generic resilient class metadata.
No description provided by the author
TargetResilientWitness object ref: swift/ABI/Metadata.h - TargetResilientWitness.
TargetResilientWitnessesHeader a header containing information about the resilient witnesses in a protocol conformance descriptor.
No description provided by the author
No description provided by the author
TargetTypeContextDescriptor object.
No description provided by the author
No description provided by the author
No description provided by the author
TargetValueWitnessTable a value-witness table.
No description provided by the author
A witness table for a protocol.
TOC is a table of contents for Swift contents.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Type aliases

No description provided by the author
Flags for anonymous type context descriptors.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Extra flags for resilient classes, since we need more than 16 bits of flags there.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Don't set 0x40 for compatibility with pre-Swift 5.8 runtimes (4 byte align).
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
ProtocolContextDescriptorFlags flags for protocol context descriptors.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
/ Identifiers for protocols with special meaning to the Swift runtime.
No description provided by the author
TargetValueWitnessFlags flags stored in the value-witness table.
No description provided by the author
TypeReferenceKind kinds of type metadata/protocol conformance records.