@@ -67,20 +67,23 @@ aid in migration?
67
67
68
68
The ABI comprises all aspects of how code is generated for the
69
69
language and how that code interacts with the Swift runtime library.
70
- It includes such things as calling conventions, function signatures,
71
- the layout of data types, and the behavior of dynamic features in
72
- the language ssuch as reflection, dynamic dispatch, and dynamic
73
- casting. It also includes things such as the addition of functions
74
- and types to the public symbols of a library.
70
+ It includes the basic rules of the language ABI, such as calling
71
+ conventions, the layout of data types, and the behavior of dynamic
72
+ features in the language like reflection, dynamic dispatch, and
73
+ dynamic casting. It also includes applications of those basic
74
+ rules to ABI-exposed declarations, such as the ` public ` functions
75
+ and types of ABI-stable libraries like the Swift standard library.
75
76
76
77
Many language proposals have no direct impact on the ABI. For
77
- example, a proposal to add the ` typealias ` declaration would have
78
- no effect on the ABI because type aliases are not represented
79
- dynamically and uses of them in code can be straightforwardly
80
- translated into uses of the aliased type. Such proposals can
81
- simply state in this section that they have no impact on the ABI.
82
- However, if * using* the feature in code that must maintain a stable
83
- ABI can have a surprising ABI impact, that should be discussed
78
+ example, a proposal to add the ` typealias ` declaration to Swift
79
+ would have no effect on the ABI because type aliases are not
80
+ represented dynamically and uses of them in code can be
81
+ straightforwardly translated into uses of the aliased type.
82
+ Proposals like this can simply state in this section that they
83
+ have no impact on the ABI. However, if * using* the feature in code
84
+ that must maintain a stable ABI can have a surprising ABI impact,
85
+ for example by changing a function signature to be different from
86
+ how it would be without using the feature, that should be discussed
84
87
in this section.
85
88
86
89
Because Swift has a stable ABI on some platforms, proposals are
@@ -96,20 +99,19 @@ function parameter would change the ABI of that function.
96
99
97
100
Proposals are acceptable if they can be thought of as merely
98
101
* adding* to the ABI, such as by adding new kinds of declarations,
99
- adding new modifiers or attributes that can be used on existing
100
- kinds of declarations, or adding new types or methods to the Swift
101
- standard library. On platforms with stable ABIs, such features
102
- will by default require a new release of the platform in order
103
- to work, and so their use in code that may deploy to older
102
+ adding new modifiers or attributes, or adding new types or methods
103
+ to the Swift standard library. On platforms with stable ABIs, such
104
+ features will by default require a new release of the platform in
105
+ order to work, and so their use in code that may deploy to older
104
106
releases will have to be availability-guarded. If this limitation
105
107
applies to any part of this proposal, that should be discussed
106
108
in this section.
107
109
108
110
Adding a function to the standard library does not always require
109
- an addition to the ABI if it can be implemented using other
110
- library functions. Library maintainers may be able to help you
111
- with this during the code review of your implementation. Adding
112
- a type or protocol always requires an addition to the ABI.
111
+ an addition to the ABI if it can be implemented using existing
112
+ functions. Library maintainers may be able to help you with this
113
+ during the code review of your implementation. Adding a type or
114
+ protocol currently always requires an addition to the ABI.
113
115
114
116
If a feature does require additions to the ABI, platforms with
115
117
stable ABIs may sometimes be able to back-deploy those additions
0 commit comments