Skip to content

Commit

Permalink
Start working on a document to describe the runtime interface.
Browse files Browse the repository at this point in the history
  • Loading branch information
jckarter committed Dec 21, 2015
1 parent 53e3890 commit 9fd5383
Showing 1 changed file with 250 additions and 0 deletions.
250 changes: 250 additions & 0 deletions docs/Runtime.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,250 @@
# The Swift Runtime

This document describes the interface to the Swift runtime, which provides
the following core functionality for Swift programs:

- memory management, including allocation and reference counting;
- the runtime type system, including dynamic casting, generic instantiation,
and protocol conformance registration;

The final runtime interface is currently a work-in-progress; it is a goal of
Swift 3 to stabilize it. This document attempts to describe both the current
state of the runtime and the intended endpoint of the stable interface.

## Entry points

TODO

```
0000000000000000 T __Z13class_getNamePKN5swift13ClassMetadataE
000000000001c660 T __ZN5swift10fatalErrorEPKcz
00000000000267b0 T __ZN5swift15getNSErrorClassEv
0000000000000010 T __ZN5swift15nameForMetadataEPKNS_8MetadataEb
000000000001e340 T __ZN5swift17MetadataAllocator5allocEm
000000000002b3c0 T __ZN5swift17getRootSuperclassEv
00000000000009d0 T __ZN5swift24swift_dynamicCastFailureEPKNS_8MetadataES2_PKc
0000000000000980 T __ZN5swift24swift_dynamicCastFailureEPKvPKcS1_S3_S3_
0000000000022600 T __ZN5swift27installCommonValueWitnessesEPNS_17ValueWitnessTableE
0000000000026de0 T __ZN5swift28tryDynamicCastNSErrorToValueEPNS_11OpaqueValueES1_PKNS_8MetadataES4_NS_16DynamicCastFlagsE
0000000000023930 T __ZN5swift32swift_assignExistentialWithCopy0EPNS_11OpaqueValueEPKS0_PKNS_8MetadataE
00000000000239b0 T __ZN5swift32swift_assignExistentialWithCopy1EPNS_11OpaqueValueEPKS0_PKNS_8MetadataE
000000000002c420 T __ZN5swift8Demangle10mangleNodeERKNSt3__110shared_ptrINS0_4NodeEEE
0000000000007550 T __ZN5swift8Demangle12nodeToStringENSt3__110shared_ptrINS0_4NodeEEERKNS0_15DemangleOptionsE
000000000002c180 T __ZN5swift8Demangle16mangleIdentifierEPKcmNS0_12OperatorKindERNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEb
00000000000074a0 T __ZN5swift8Demangle18demangleTypeAsNodeEPKcmRKNS0_15DemangleOptionsE
00000000000049e0 T __ZN5swift8Demangle20demangleSymbolAsNodeEPKcmRKNS0_15DemangleOptionsE
0000000000007790 T __ZN5swift8Demangle20demangleTypeAsStringEPKcmRKNS0_15DemangleOptionsE
0000000000007630 T __ZN5swift8Demangle22demangleSymbolAsStringEPKcmRKNS0_15DemangleOptionsE
00000000000049d0 T __ZN5swift8Demangle4NodeD1Ev
0000000000004900 T __ZN5swift8Demangle4NodeD2Ev
00000000000078f0 T __ZN5swift8Punycode14decodePunycodeEN4llvm9StringRefERNSt3__16vectorIjNS3_9allocatorIjEEEE
0000000000007c70 T __ZN5swift8Punycode14encodePunycodeERKNSt3__16vectorIjNS1_9allocatorIjEEEERNS1_12basic_stringIcNS1_11char_traitsIcEENS3_IcEEEE
0000000000007fc0 T __ZN5swift8Punycode18decodePunycodeUTF8EN4llvm9StringRefERNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEE
000000000002f720 T __ZN5swift8Punycode18encodePunycodeUTF8EN4llvm9StringRefERNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEE
0000000000026910 T __ZNK5swift10SwiftError13isPureNSErrorEv
0000000000026960 T __ZNK5swift10SwiftError19getErrorConformanceEv
00000000000266c0 T __ZNK5swift10SwiftError7getTypeEv
0000000000023430 T __ZNK5swift23ExistentialTypeMetadata12mayTakeValueEPKNS_11OpaqueValueE
00000000000234a0 T __ZNK5swift23ExistentialTypeMetadata12projectValueEPKNS_11OpaqueValueE
0000000000023550 T __ZNK5swift23ExistentialTypeMetadata14getDynamicTypeEPKNS_11OpaqueValueE
00000000000235a0 T __ZNK5swift23ExistentialTypeMetadata15getWitnessTableEPKNS_11OpaqueValueEj
0000000000023400 T __ZNK5swift23ExistentialTypeMetadata17getRepresentationEv
0000000000023460 T __ZNK5swift23ExistentialTypeMetadata26deinitExistentialContainerEPNS_11OpaqueValueE
0000000000002ee0 T __ZNK5swift25ProtocolConformanceRecord15getWitnessTableEPKNS_8MetadataE
0000000000002e30 T __ZNK5swift25ProtocolConformanceRecord24getCanonicalTypeMetadataEv
0000000000023e30 T __ZNK5swift8Metadata14getClassObjectEv
0000000000023de0 T __ZNK5swift8Metadata17getGenericPatternEv
0000000000023da0 T __ZNK5swift8Metadata24getNominalTypeDescriptorEv
00000000000048b0 T __ZNR5swift8Demangle16DemanglerPrinterlsEx
0000000000004860 T __ZNR5swift8Demangle16DemanglerPrinterlsEy
000000000002b340 T __swift_class_getInstancePositiveExtentSize
000000000002b350 T __swift_class_getInstancePositiveExtentSize_native
0000000000024040 T __swift_debug_verifyTypeLayoutAttribute
0000000000004080 T __swift_getSuperclass_nonNull
0000000000003ff0 T __swift_isClass
00000000000279f0 T __swift_usesNativeSwiftReferenceCounting_class
000000000002ae40 T __swift_usesNativeSwiftReferenceCounting_nonNull
0000000000032e00 T _swift_ClassMirror_count
00000000000332a0 T _swift_ClassMirror_quickLookObject
0000000000032e90 T _swift_ClassMirror_subscript
0000000000032a60 T _swift_EnumMirror_caseName
0000000000032b40 T _swift_EnumMirror_count
0000000000032bd0 T _swift_EnumMirror_subscript
0000000000032590 T _swift_MagicMirrorData_objcValue
0000000000032730 T _swift_MagicMirrorData_objcValueType
00000000000325d0 T _swift_MagicMirrorData_summary
0000000000032530 T _swift_MagicMirrorData_value
0000000000032580 T _swift_MagicMirrorData_valueType
00000000000331e0 T _swift_ObjCMirror_count
0000000000033200 T _swift_ObjCMirror_subscript
00000000000328a0 T _swift_StructMirror_count
00000000000328b0 T _swift_StructMirror_subscript
0000000000032750 T _swift_TupleMirror_count
0000000000032760 T _swift_TupleMirror_subscript
000000000001cb30 T _swift_allocBox
00000000000268e0 T _swift_allocError
000000000001c990 T _swift_allocObject
000000000001cab0 T _swift_allocPOD
000000000001e3e0 T _swift_allocateGenericClassMetadata
000000000001e620 T _swift_allocateGenericValueMetadata
0000000000023a40 T _swift_assignExistentialWithCopy
0000000000026d50 T _swift_bridgeErrorTypeToNSError
0000000000003b60 T _swift_bridgeNonVerbatimFromObjectiveC
0000000000003c80 T _swift_bridgeNonVerbatimFromObjectiveCConditional
00000000000037e0 T _swift_bridgeNonVerbatimToObjectiveC
0000000000027ba0 T _swift_bridgeObjectRelease
0000000000027c50 T _swift_bridgeObjectRelease_n
0000000000027b50 T _swift_bridgeObjectRetain
0000000000027be0 T _swift_bridgeObjectRetain_n
000000000001ca60 T _swift_bufferAllocate
000000000001ca70 T _swift_bufferAllocateOnStack
000000000001ca80 T _swift_bufferDeallocateFromStack
000000000001ca90 T _swift_bufferHeaderSize
0000000000003060 T _swift_conformsToProtocol
0000000000026db0 T _swift_convertErrorTypeToNSError
0000000000026d60 T _swift_convertNSErrorToErrorType
000000000001dbf0 T _swift_copyPOD
000000000001cd30 T _swift_deallocBox
000000000001d490 T _swift_deallocClassInstance
0000000000026900 T _swift_deallocError
000000000001cd60 T _swift_deallocObject
000000000001d4c0 T _swift_deallocPartialClassInstance
0000000000023e60 T _swift_demangleSimpleClass
0000000000001470 T _swift_dynamicCast
0000000000000a60 T _swift_dynamicCastClass
0000000000000ae0 T _swift_dynamicCastClassUnconditional
0000000000028750 T _swift_dynamicCastForeignClass
000000000002ae20 T _swift_dynamicCastForeignClassMetatype
000000000002ae30 T _swift_dynamicCastForeignClassMetatypeUnconditional
0000000000028760 T _swift_dynamicCastForeignClassUnconditional
00000000000011c0 T _swift_dynamicCastMetatype
0000000000000cf0 T _swift_dynamicCastMetatypeToObjectConditional
0000000000000d20 T _swift_dynamicCastMetatypeToObjectUnconditional
00000000000012e0 T _swift_dynamicCastMetatypeUnconditional
00000000000286c0 T _swift_dynamicCastObjCClass
0000000000028bd0 T _swift_dynamicCastObjCClassMetatype
0000000000028c00 T _swift_dynamicCastObjCClassMetatypeUnconditional
0000000000028700 T _swift_dynamicCastObjCClassUnconditional
0000000000028af0 T _swift_dynamicCastObjCProtocolConditional
0000000000028a50 T _swift_dynamicCastObjCProtocolUnconditional
0000000000028960 T _swift_dynamicCastTypeToObjCProtocolConditional
00000000000287d0 T _swift_dynamicCastTypeToObjCProtocolUnconditional
0000000000000de0 T _swift_dynamicCastUnknownClass
0000000000000fd0 T _swift_dynamicCastUnknownClassUnconditional
0000000000027120 T _swift_errorRelease
0000000000027100 T _swift_errorRetain
000000000001d630 T _swift_fixLifetime
00000000000039c0 T _swift_getBridgedNonVerbatimObjectiveCType
0000000000000b60 T _swift_getDynamicType
000000000001c560 T _swift_getEnumCaseMultiPayload
000000000001be60 T _swift_getEnumCaseSinglePayload
0000000000026b80 T _swift_getErrorValue
0000000000023230 T _swift_getExistentialMetatypeMetadata
0000000000023630 T _swift_getExistentialTypeMetadata
0000000000023b90 T _swift_getForeignTypeMetadata
000000000001ef30 T _swift_getFunctionTypeMetadata
000000000001eed0 T _swift_getFunctionTypeMetadata1
000000000001f1f0 T _swift_getFunctionTypeMetadata2
000000000001f250 T _swift_getFunctionTypeMetadata3
0000000000028c40 T _swift_getGenericClassObjCName
000000000001e940 T _swift_getGenericMetadata
000000000001e9c0 T _swift_getGenericMetadata1
000000000001ea60 T _swift_getGenericMetadata2
000000000001eb00 T _swift_getGenericMetadata3
000000000001eba0 T _swift_getGenericMetadata4
0000000000028bc0 T _swift_getInitializedObjCClass
0000000000022fd0 T _swift_getMetatypeMetadata
000000000001ec50 T _swift_getObjCClassMetadata
0000000000022fb0 T _swift_getObjectType
000000000001e6b0 T _swift_getResilientMetadata
0000000000022260 T _swift_getTupleTypeMetadata
00000000000225a0 T _swift_getTupleTypeMetadata2
00000000000225d0 T _swift_getTupleTypeMetadata3
00000000000006f0 T _swift_getTypeName
0000000000022be0 T _swift_initClassMetadata_UniversalStrategy
000000000001c100 T _swift_initEnumMetadataMultiPayload
000000000001bd60 T _swift_initEnumValueWitnessTableSinglePayload
000000000001ca00 T _swift_initStackObject
0000000000022a20 T _swift_initStructMetadata_UniversalStrategy
0000000000024230 T _swift_initializeSuperclass
0000000000028b60 T _swift_instantiateObjCClass
0000000000003d90 T _swift_isBridgedNonVerbatimToObjectiveC
0000000000003f50 T _swift_isClassOrObjCExistential
00000000000040c0 T _swift_isClassType
000000000001d280 T _swift_isDeallocating
0000000000004130 T _swift_isOptionalType
000000000002afe0 T _swift_isUniquelyReferencedNonObjC
000000000002af50 T _swift_isUniquelyReferencedNonObjC_nonNull
000000000002b060 T _swift_isUniquelyReferencedNonObjC_nonNull_bridgeObject
000000000002b200 T _swift_isUniquelyReferencedOrPinnedNonObjC_nonNull
000000000002b130 T _swift_isUniquelyReferencedOrPinnedNonObjC_nonNull_bridgeObject
000000000002b2f0 T _swift_isUniquelyReferencedOrPinned_native
000000000002b290 T _swift_isUniquelyReferencedOrPinned_nonNull_native
000000000002af00 T _swift_isUniquelyReferenced_native
000000000002aea0 T _swift_isUniquelyReferenced_nonNull_native
0000000000028770 T _swift_objcRespondsToSelector
0000000000026550 T _swift_once
000000000001ce10 T _swift_projectBox
00000000000336d0 T _swift_reflectAny
0000000000002ef0 T _swift_registerProtocolConformances
000000000001ce70 T _swift_release
000000000001cee0 T _swift_release_n
000000000001c7d0 T _swift_reportFatalError
000000000001c730 T _swift_reportFatalErrorInFile
000000000001c940 T _swift_reportMissingMethod
000000000001c8d0 T _swift_reportUnimplementedInitializer
000000000001c840 T _swift_reportUnimplementedInitializerInFile
000000000001ce30 T _swift_retain
000000000001cf50 T _swift_retainCount
000000000001ce50 T _swift_retain_n
000000000001d400 T _swift_rootObjCDealloc
000000000001c960 T _swift_slowAlloc
000000000001c980 T _swift_slowDealloc
0000000000033930 T _swift_stdlib_demangleName
000000000001c400 T _swift_storeEnumTagMultiPayload
000000000001bf90 T _swift_storeEnumTagSinglePayload
000000000001d140 T _swift_tryPin
000000000001d240 T _swift_tryRetain
0000000000027b10 T _swift_unknownRelease
0000000000027a70 T _swift_unknownRelease_n
0000000000027ad0 T _swift_unknownRetain
0000000000027a10 T _swift_unknownRetain_n
0000000000027d50 T _swift_unknownUnownedAssign
00000000000280a0 T _swift_unknownUnownedCopyAssign
0000000000027fd0 T _swift_unknownUnownedCopyInit
0000000000027ed0 T _swift_unknownUnownedDestroy
0000000000027cb0 T _swift_unknownUnownedInit
0000000000027f20 T _swift_unknownUnownedLoadStrong
00000000000281f0 T _swift_unknownUnownedTakeAssign
0000000000028070 T _swift_unknownUnownedTakeInit
0000000000027f70 T _swift_unknownUnownedTakeStrong
00000000000282b0 T _swift_unknownWeakAssign
0000000000028560 T _swift_unknownWeakCopyAssign
00000000000284e0 T _swift_unknownWeakCopyInit
00000000000283e0 T _swift_unknownWeakDestroy
0000000000028270 T _swift_unknownWeakInit
0000000000028420 T _swift_unknownWeakLoadStrong
0000000000028610 T _swift_unknownWeakTakeAssign
0000000000028520 T _swift_unknownWeakTakeInit
0000000000028470 T _swift_unknownWeakTakeStrong
000000000001d3c0 T _swift_unownedCheck
000000000001cfb0 T _swift_unownedRelease
000000000001d0a0 T _swift_unownedRelease_n
000000000001cf70 T _swift_unownedRetain
000000000001cf60 T _swift_unownedRetainCount
000000000001d2b0 T _swift_unownedRetainStrong
000000000001d310 T _swift_unownedRetainStrongAndRelease
000000000001d060 T _swift_unownedRetain_n
000000000001d1b0 T _swift_unpin
000000000001ca20 T _swift_verifyEndOfLifetime
000000000001d680 T _swift_weakAssign
000000000001d830 T _swift_weakCopyAssign
000000000001d790 T _swift_weakCopyInit
000000000001d770 T _swift_weakDestroy
000000000001d640 T _swift_weakInit
000000000001d6d0 T _swift_weakLoadStrong
000000000001d8b0 T _swift_weakTakeAssign
000000000001d800 T _swift_weakTakeInit
000000000001d710 T _swift_weakTakeStrong
0000000000027140 T _swift_willThrow
```

0 comments on commit 9fd5383

Please sign in to comment.