]> git.saurik.com Git - apple/objc4.git/blobdiff - runtime/objc-class-old.mm
objc4-818.2.tar.gz
[apple/objc4.git] / runtime / objc-class-old.mm
index acc269e0ef0f149817370dd292274d1e400f3e2a..c0a79a744eaea4bd33c5c805c7060a7670c07ff0 100644 (file)
@@ -336,7 +336,7 @@ static void _class_resolveClassMethod(id inst, SEL sel, Class cls)
     ASSERT(cls->isMetaClass());
     SEL resolve_sel = @selector(resolveClassMethod:);
 
-    if (!lookUpImpOrNil(inst, resolve_sel, cls)) {
+    if (!lookUpImpOrNilTryCache(inst, resolve_sel, cls)) {
         // Resolver not implemented.
         return;
     }
@@ -346,7 +346,7 @@ static void _class_resolveClassMethod(id inst, SEL sel, Class cls)
 
     // Cache the result (good or bad) so the resolver doesn't fire next time.
     // +resolveClassMethod adds to self->ISA() a.k.a. cls
-    IMP imp = lookUpImpOrNil(inst, sel, cls);
+    IMP imp = lookUpImpOrNilTryCache(inst, sel, cls);
     if (resolved  &&  PrintResolving) {
         if (imp) {
             _objc_inform("RESOLVE: method %c[%s %s] "
@@ -376,7 +376,7 @@ static void _class_resolveInstanceMethod(id inst, SEL sel, Class cls)
 {
     SEL resolve_sel = @selector(resolveInstanceMethod:);
 
-    if (! lookUpImpOrNil(cls, resolve_sel, cls->ISA())) {
+    if (! lookUpImpOrNilTryCache(cls, resolve_sel, cls->ISA())) {
         // Resolver not implemented.
         return;
     }
@@ -386,7 +386,7 @@ static void _class_resolveInstanceMethod(id inst, SEL sel, Class cls)
 
     // Cache the result (good or bad) so the resolver doesn't fire next time.
     // +resolveInstanceMethod adds to self a.k.a. cls
-    IMP imp = lookUpImpOrNil(inst, sel, cls);
+    IMP imp = lookUpImpOrNilTryCache(inst, sel, cls);
 
     if (resolved  &&  PrintResolving) {
         if (imp) {
@@ -424,7 +424,7 @@ _class_resolveMethod(id inst, SEL sel, Class cls)
         // try [nonMetaClass resolveClassMethod:sel]
         // and [cls resolveInstanceMethod:sel]
         _class_resolveClassMethod(inst, sel, cls);
-        if (!lookUpImpOrNil(inst, sel, cls)) {
+        if (!lookUpImpOrNilTryCache(inst, sel, cls)) {
             _class_resolveInstanceMethod(inst, sel, cls);
         }
     }
@@ -2593,8 +2593,7 @@ id object_reallocFromZone(id obj, size_t nBytes, void *z)
 void *object_getIndexedIvars(id obj)
 {
     // ivars are tacked onto the end of the object
-    if (!obj) return nil;
-    if (obj->isTaggedPointer()) return nil;
+    if (obj->isTaggedPointerOrNil()) return nil;
     return ((char *) obj) + obj->ISA()->alignedInstanceSize();
 }