@@ -222,13 +222,18 @@ classes.
222
222
record is stored at **offset 0 **, in place of an integer kind discriminator.
223
223
- The **super pointer ** pointing to the metadata record for the superclass is
224
224
stored at **offset 1 **. If the class is a root class, it is null.
225
- - Two words are reserved for use by the Objective-C runtime at **offset 2 **
226
- and **offset 3 **.
227
- - The **rodata pointer ** is stored at **offset 4 **; it points to an Objective-C
228
- compatible rodata record for the class. This pointer value includes a tag.
225
+ - On platforms which support Objective-C interoperability, two words are
226
+ reserved for use by the Objective-C runtime at **offset 2 ** and **offset
227
+ 3 **; on other platforms, nothing is reserved.
228
+ - On platforms which support Objective-C interoperability, the **rodata
229
+ pointer ** is stored at **offset 4 **; on other platforms, it is not present.
230
+ The rodata pointer points to an Objective-C compatible rodata record for the
231
+ class. This pointer value includes a tag.
229
232
The **low bit is always set to 1 ** for Swift classes and always set to 0 for
230
233
Objective-C classes.
231
- - The **class flags ** are a 32-bit field at **offset 5 **.
234
+ - The **class flags ** are a 32-bit field at **offset 5 ** on platforms which
235
+ support Objective-C interoperability; on other platforms, the field is at
236
+ **offset 2 **.
232
237
- The **instance address point ** is a 32-bit field following the class flags.
233
238
A pointer to an instance of this class points this number of bytes after the
234
239
beginning of the instance.
@@ -246,8 +251,11 @@ classes.
246
251
object size. This is the number of bytes of storage in the class metadata
247
252
object.
248
253
- The `nominal type descriptor `_ for the most-derived class type is referenced
249
- at an offset immediately following the class object address point. This is
250
- **offset 8 ** on a 64-bit platform or **offset 11 ** on a 32-bit platform.
254
+ at an offset immediately following the class object address point. On 64-bit
255
+ and 32-bit platforms which support Objective-C interoperability, this is,
256
+ respectively, at **offset 8 ** and at **offset 11 **; in platforms that do not
257
+ support Objective-C interoperability, this is, respectively, at **offset 5 **
258
+ and at **offset 8 **.
251
259
- For each Swift class in the class's inheritance hierarchy, in order starting
252
260
from the root class and working down to the most derived class, the following
253
261
fields are present:
0 commit comments