
methodSignatureForSeletor会调用class_getInstanceMethod去查找方法,然而在用class_getInstanceMethod中如果没有发现IMP,则会最后调用一次resolveInstanceMethond
// No implementation found. Try method resolver once.
if (resolver && !triedResolver) {
runtimeLock.unlock();
_class_resolveMethod(cls, sel, inst);
runtimeLock.lock();
// Don't cache the result; we don't hold the lock so it may have
// changed already. Re-do the search from scratch instead.
triedResolver = YES;
goto retry;
}