State of Swift Internals: Swift 4 & 5
summary
Shows concrete findings: compiler emits Swift Intermediate Language (SIL) then LLVM IR and assembly, with reproducible examples and code on GitHub; documents that ABI ~90% complete in Swift 4.2 and that data layout is often reordered for 64‑bit alignment (struct packing and stack allocation observed, including a mysterious double-init and copy‑out pattern); calling conventions largely follow System V so the runtime is callable from other languages; notes ownership/exclusivity in 4.2 and precise library‑evolution rules that specify what changes are ABI‑safe.
AI-written summary · about
chapters (20)
- 0:00Introduction
- 2:20Outline
- 5:08Systems Programming Language
- 8:09Swift Intermediate Language
- 9:45API Stability
- 11:27Data Layouts
- 13:56Game Spacing
- 16:50Init
- 18:05Read
- 25:00Alignment
- 28:20Structure
- 29:33Compiler
- 33:22Calling Convention
- 35:33Registers
- 37:36Swift Intermediate
- 38:39Intermediate Swift
- 40:25Library
- 42:39Lifetimes
- 46:20Swift C
- 46:48Swift Runtime








