In relation to object C in object, class, Meta class, the following call is in the source code of OBJC4:
After the LIBOBJC Dynamic library is called, the following function calls in turn
Asm
_map_images:
...
JMP _map_2_images
Map_2_images
Map_images_nolock
_read_images
_objc_connect_classes_from_image
Connect_class
Really_connect_class
Set_superclass
/***********************************************************************
* Objc_allocateclass.
**********************************************************************/
void Set_superclass (class CLS, class Supercls, bool cls_is_new)
{
Class meta = cls->ISA();
if (supercls) {
cls->Superclass = supercls;
meta->Superclass = supercls->ISA();
Meta->Initisa(supercls->Isa (), ISA ());
//Propagate C + + cdtors from superclass.
if (supercls->info & cls_has_cxx_structors) {
if (cls_is_new) cls->info |= cls_has_cxx_structors;
else cls->setInfo(cls_has_cxx_structors);
}
//Superclass is no longer a leaf for cache flushing
if (supercls->info & cls_leaf) {
Supercls->clearinfo(cls_leaf);
Supercls->ISA(),clearinfo(cls_leaf);
}
} Else {
cls->Superclass = Nil; //Superclass of root class is nil
meta->Superclass = CLS; //Superclass of root metaclass is root class
Meta->Initisa(meta); //Metaclass of root metaclass is root metaclass
//Root class is never a leaf for cache flushing, because the
//Root metaclass is a subclass. (This could is optimized, but
//is too uncommon to bother.)
Cls->clearinfo(cls_leaf);
Meta->clearinfo(cls_leaf);
}
}
The annotations in Set_superclass clearly describe the relationship and assignment between class, Meta Class, class Isa, Meta Isa, class Super class, Meta Super class, and so on.
Object-c Runtime from code to code