Typical Type C Message Implementation

I’m interested in what a typical (or at least Apple) implementation of the Objective C dynamic messaging system looks like. How selectors are processed at compilation and runtime, which really means NSObject*how the method implementation is implemented.

In C ++, we have virtual functions; how they are implemented is officially an implementation detail, but in fact, the VF table pointer as the first data item is largely data. I am wondering if there is a similar ubiquitous way to implement the ObjC class system.

+3
source share
3 answers

This can be quite lengthy. Ughoavgfhws answer is a good start.

Id :

, objc clang .

+3

/usr/include/objc Mac . (Apple , . googling " c runtime".) : , . isa ( ). , , . , .

+3

Apple Objective-C Runtime Reference C, Objective-C , - . - , 10,5 , 1986 .

Objective-C ; , , C, , , .

+1

All Articles