Skip to content

Commit be07366

Browse files
committed
Update Mangling.rst for recent changes
- Outlined value operations are now 'WO' and not 'W' - Protocol witness table pattern 'Wp' - Resilient protocol witness table 'Wr' - Protocol requirement table 'WR'
1 parent b12e280 commit be07366

File tree

1 file changed

+25
-19
lines changed

1 file changed

+25
-19
lines changed

docs/ABI/Mangling.rst

Lines changed: 25 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,11 @@ Globals
6363
global ::= context 'MXX' // anonymous context descriptor
6464
global ::= context identifier 'MXY' // anonymous context descriptor
6565
global ::= type assoc_type_path 'MXA' // generic parameter ref
66-
global ::= nominal-type 'Mo' // class metadata immediate member base offset
6766
global ::= protocol 'Mp' // protocol descriptor
68-
global ::= protocol-conformance 'Mc' // protocol conformance descriptor
67+
global ::= protocol 'WR' // protocol requirement table
68+
69+
global ::= nominal-type 'Mo' // class metadata immediate member base offset
70+
6971
global ::= type 'MF' // metadata for remote mirrors: field descriptor
7072
global ::= type 'MB' // metadata for remote mirrors: builtin type descriptor
7173
global ::= protocol-conformance 'MA' // metadata for remote mirrors: associated type descriptor
@@ -76,35 +78,27 @@ Globals
7678
global ::= mangled-name 'Ta' // ObjC partial application forwarder
7779

7880
global ::= type 'w' VALUE-WITNESS-KIND // value witness
81+
82+
global ::= protocol-conformance 'Mc' // protocol conformance descriptor
83+
global ::= protocol-conformance 'WP' // protocol witness table
7984
global ::= protocol-conformance 'Wa' // protocol witness table accessor
85+
8086
global ::= protocol-conformance 'WG' // generic protocol witness table
87+
global ::= protocol-conformance 'Wp' // protocol witness table pattern
88+
global ::= protocol-conformance 'Wr' // resilient witness table
8189
global ::= protocol-conformance 'WI' // generic protocol witness table instantiation function
8290
global ::= type protocol-conformance 'WL' // lazy protocol witness table cache variable
83-
global ::= entity 'Wo' // witness table offset
84-
global ::= protocol-conformance 'WP' // protocol witness table
8591

8692
global ::= protocol-conformance identifier 'Wt' // associated type metadata accessor
8793
global ::= protocol-conformance assoc_type_path nominal-type 'WT' // associated type witness table accessor
8894
global ::= type protocol-conformance 'Wl' // lazy protocol witness table accessor
95+
8996
global ::= type 'WV' // value witness table
90-
global ::= entity 'Wv' DIRECTNESS // field offset
91-
global ::= entity 'WC' // resilient enum tag index
92-
93-
global ::= type 'Wy' // Outlined Copy Function Type
94-
global ::= type 'We' // Outlined Consume Function Type
95-
global ::= type 'Wr' // Outlined Retain Function Type
96-
global ::= type 'Ws' // Outlined Release Function Type
97-
global ::= type 'Wb' INDEX // Outlined InitializeWithTake Function Type
98-
global ::= type 'Wc' INDEX // Outlined InitializeWithCopy Function Type
99-
global ::= type 'Wd' INDEX // Outlined AssignWithTake Function Type
100-
global ::= type 'Wf' INDEX // Outlined AssignWithCopy Function Type
101-
global ::= type 'Wh' INDEX // Outlined Destroy Function Type
97+
global ::= entity 'Wvd' // field offset
98+
global ::= entity 'WC' // resilient enum tag index
10299

103100
assoc_type_path ::= identifier '_' identifier*
104101

105-
DIRECTNESS ::= 'd' // direct
106-
DIRECTNESS ::= 'i' // indirect
107-
108102
A direct symbol resolves directly to the address of an object. An
109103
indirect symbol resolves to the address of a pointer to the object.
110104
They are distinct manglings to make a certain class of bugs
@@ -175,6 +169,18 @@ The types in a reabstraction thunk helper function are always non-polymorphic
175169
``<VALUE-WITNESS-KIND>`` differentiates the kinds of value
176170
witness functions for a type.
177171

172+
::
173+
174+
global ::= generic-signature? type 'WOy' // Outlined copy
175+
global ::= generic-signature? type 'WOe' // Outlined consume
176+
global ::= generic-signature? type 'WOr' // Outlined retain
177+
global ::= generic-signature? type 'WOs' // Outlined release
178+
global ::= generic-signature? type 'WOb' // Outlined initializeWithTake
179+
global ::= generic-signature? type 'WOc' // Outlined initializeWithCopy
180+
global ::= generic-signature? type 'WOd' // Outlined assignWithTake
181+
global ::= generic-signature? type 'WOf' // Outlined assignWithCopy
182+
global ::= generic-signature? type 'WOh' // Outlined destroy
183+
178184
Entities
179185
~~~~~~~~
180186

0 commit comments

Comments
 (0)