void objc_msgSend(void /* id self, SEL op, ....*/)
[self class] <=> objc_msgSend(self. @selector(class))
void objc_msgSendSuper(void /* struct objc_super *super, SEL op, ...*/)
struct objc_super {
__unsafe_unretained id receiver;
}
[super class] <=> objc_msgSendSuper(super, @selector(class))
复制代码
以SEL为能够,经过hash查找具体IMP缓存
一、对于已排序的方法列表,采用二分查找 二、对于未排序的方法列表,采用通常遍历数据结构
class_addMethod(self, @selector(deletionMethod), addedMethod, "v@:");
复制代码
@dynamic函数