IMP
imp-pointer to function that actually executes the body of the function
#if !OBJC_OLD_DISPATCH_PROTOTYPEStypedef void (*IMP)(void /* id, SEL, ... */ ); #elsetypedef id (*IMP)(id, SEL, ...); #endif
As you can see, the first two parameters of this function are the ID (the message recipient, that is, the object), and the SEL (the name of the method)
Method/objc_method
Method-pointers to methods in Objective C
typedef struct objc_method *Method;
which
struct objc_method { SEL method_name OBJC2_UNAVAILABLE; char *method_types OBJC2_UNAVAILABLE; IMP method_imp OBJC2_UNAVAILABLE;} OBJC2_UNAVAILABLE;
_cmd
A variable of the SEL type, the first two hidden parameters of the Objective C function are self and _cmd
Ivar
Ivar-objective instance variables in C
typedef struct objc_ivar *Ivar;
You can see the memory model of the variable
struct objc_ivar { char *ivar_name OBJC2_UNAVAILABLE; char *ivar_type OBJC2_UNAVAILABLE; int ivar_offset OBJC2_UNAVAILABLE;#ifdef __LP64__ int space OBJC2_UNAVAILABLE;#endif} OBJC2_UNAVAILABLE;
_cmd, IMP in Runtime