ABI Dashboard

Last updated: 22 February 2018

One of the top priorities for Swift right now is compatibility across future Swift versions. One major component of this is ABI stability, which enables binary compatibility between applications and libraries compiled with different versions of Swift. The Swift ABI Manifesto describes the engineering and design tasks that need to be complete before declaring the ABI stable. The following dashboard tracks the progress of these tasks*:

Data Layout

Task Tracking Bug Status Availability
Define efficient layout of partially opaque aggregates SR-3722 Deferred N/A
Determine impact of annotations on a library's types in future versions of the library SR-3911 Deferred N/A
Define layout algorithms for structs SR-3723, SR-3724, SR-3725, SR-3912
Define layout algorithm for tuples SR-3726
Define layout algorithm for payloaded enums SR-3727
Use word-size field in native object header for reference counting SR-4353 Done Swift 4.1
Explore using spare bits in references for ARC optimizations SR-3728 Won't do N/A
Re-evaluate buffer size for existential containers SR-3340 In progress
Evaluate making out-of-line allocation be copy-on-write SR-4330 Done Swift 4.0
Evaluate converting from an existential parameter into a protocol-constrained generic parameter SR-4331
Create technical specification of the layout algorithms for future compilers SR-3730

Type Metadata

Task Tracking Bug Status Availability
Plan for the evolution of type metadata (including carving out space for future functionality and freezing performance critical areas) SR-3923 Done Not yet released
Clean-up historical artifacts in the metadata representation SR-3924 Done Not yet released
Present more semantic info and space needed in metadata for future features (e.g. reflection) SR-3925 Won't do N/A
Technical specification for the fixed part of the metadata layout of all language constructs SR-3731
Decide the mangling of names stored in named value type metadata SR-3926
Review the efficiency of interacting with the enum discriminator through the witness table SR-4332 Done Swift 4.1
Lock down the layout of value witness tables SR-3927
Decide what class metadata is opaque for library evolution SR-4343
Lock down the layout of vtables or decide to use thunks SR-3928
Lock down the layout of a protocol witness table SR-3732
Decide the layout of existential type metadata, including protocol descriptors SR-4341 Done Swift 4.1
Consider updating the existing tuple-design for function parameters SR-4333 Done Not yet released

Mangling

Task Tracking Bug Status Availability
Define canonicalization of generic and protocol requirements for order-agnostic mangling SR-3733 Done Swift 4.1
Review mangling variadicity of function parameters SR-3734 Done Swift 4.0
Investigate not distinguishing between struct/enum SR-3930 Won't do N/A
Investigate dropping internal witness table symbols that aren't useful for debugging SR-3931
Overhaul of word substitution to reduce redundancy in names SR-4344 Done Swift 4.0
Investigate mangling based on known overload set for non-resilient functions SR-3933 Won't do N/A
Redesign type/conformance info manglings to maximize common prefixes SR-3932 Done Swift 4.0

Calling Convention

Task Tracking Bug Status Availability
Adopt the new Swift calling convention SR-4346 Done Swift 4.0
Lock down function signature lowering scheme SR-4349
Determine number of registers to hold return values SR-3946
Investigate whether to split values with partially opaque layout SR-3947 Deferred N/A

Runtime

Task Tracking Bug Status Availability
Audit of every runtime function for desirability and behavior SR-3735 Done Swift 4.1
Create new runtime APIs or modifications to existing APIs for library evolution and ownership semantics SR-4352

Standard Library

Task Tracking Bug Status Availability
Redesign String SR-4354 In progress
Protocol-oriented integers SR-3196 Done Swift 4.0
Enforce appropriate constraints on Sequences and Collections SR-3453 Done Swift 4.1
Collapse various collection wrappers using conditional conformance SR-3458 Done Swift 4.1
Create abstractions for efficient use of contiguous memory for memory ownership features SR-4355

* Note: Tasks may be added as more progress is made.