]> gcc.gnu.org Git - gcc.git/commitdiff
(__objc_init_install_dtable,
authorKresten Krab Thorup <krab@gcc.gnu.org>
Mon, 12 Apr 1993 15:44:02 +0000 (15:44 +0000)
committerKresten Krab Thorup <krab@gcc.gnu.org>
Mon, 12 Apr 1993 15:44:02 +0000 (15:44 +0000)
__objc_install_dtable_for_class): Call to
__objc_resolve_class_links moved to the latter.

From-SVN: r4093

gcc/objc/sendmsg.c

index 90688a5d00893d89e5dfafb032d9c91d5d2840e3..301313d9f4766ef08f579d05ae730ea2b1ca2faa 100644 (file)
@@ -77,6 +77,12 @@ get_imp (Class_t class, SEL sel)
 #endif
 }
 
+__inline__ BOOL
+__objc_responds_to (id object, SEL sel)
+{
+  return get_imp (object->class_pointer, sel) != __objc_missing_method;
+}
+
 /* This is the lookup function.  All entries in the table are either a 
    valid method *or* one of `__objc_missing_method' which calls
    forward:: etc, or `__objc_init_install_dtable' which installs the
@@ -139,11 +145,6 @@ static void __objc_init_install_dtable(id receiver, SEL op)
   void* args;
   void* result;
 
-  /* If the class has not yet had it's class links resolved, we must 
-     re-compute all class links */
-  if(!CLS_ISRESOLV(receiver->class_pointer))
-    __objc_resolve_class_links();
-
   /* This may happen, if the programmer has taken the address of a 
      method before the dtable was initialized... too bad for him! */
   if(receiver->class_pointer->dtable != __objc_uninstalled_dtable)
@@ -232,10 +233,17 @@ static void
 __objc_install_dispatch_table_for_class (Class_t class)
 {
 #ifdef OBJC_SPARSE_LOOKUP
-  Class_t super = class->super_class;
+  Class_t super;
   MethodList_t mlist;
   int counter;
 
+  /* If the class has not yet had it's class links resolved, we must 
+     re-compute all class links */
+  if(!CLS_ISRESOLV(class))
+    __objc_resolve_class_links();
+
+  super = class->super_class;
+
   if (super != 0 && (super->dtable == __objc_uninstalled_dtable))
     __objc_install_dispatch_table_for_class (super);
 
This page took 0.064729 seconds and 5 git commands to generate.