swiftlang / swift

The Swift Programming Language
https://swift.org
Apache License 2.0
67.28k stars 10.33k forks source link

[SR-3730] Technical specification of the layout algorithms #46315

Open ec8ba57e-8db4-4a5b-97d9-d3e186c86593 opened 7 years ago

ec8ba57e-8db4-4a5b-97d9-d3e186c86593 commented 7 years ago
Previous ID SR-3730
Radar rdar://problem/31411200
Original Reporter @ematejska
Type Task
Additional Detail from JIRA | | | |------------------|-----------------| |Votes | 0 | |Component/s | | |Labels | Task, AffectsABI | |Assignee | None | |Priority | Medium | md5: da7c0c4eedd5aafaec6dfec6b21671f4

Issue Description:

Provide a technical specification of the layout algorithms that future compilers must adhere to in order to ensure binary compatibility as part of locking down ABI Stability

bob-wilson commented 7 years ago

@swift-ci create

atrick commented 6 years ago

The optimizer makes assumptions about layout equivalence. See canUnsafeCastStruct/Tuple/Enum. Move this logic into a central place where we specify ABI requirements.