This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[Patch]: minor inlining in Objective-C runtime


The following patch inlines an internal function in method lookup.

The speed up is normally negligible as class_get_instance_method and
class_get_class_method are rarely used (at least in gnustep) but
anyway makes sense to do it.


Sun Apr 22 16:01:23 2001  Nicola Pero  <n.pero@mi.flashnet.it>

	* sendmsg.c (search_for_method_in_hierarchy): Inlined.


Index: sendmsg.c
===================================================================
RCS file: /cvs/gcc/gcc/libobjc/sendmsg.c,v
retrieving revision 1.5
diff -u -r1.5 sendmsg.c
--- sendmsg.c	2001/02/24 06:14:36	1.5
+++ sendmsg.c	2001/04/22 14:02:54
@@ -74,7 +74,8 @@
 static id
 #endif
 __objc_block_forward(id, SEL, ...);
-static Method_t search_for_method_in_hierarchy (Class class, SEL sel);
+static inline Method_t 
+search_for_method_in_hierarchy (Class class, SEL sel);
 Method_t search_for_method_in_list(MethodList_t list, SEL op);
 id nil_method(id, SEL, ...);
 
@@ -460,7 +461,7 @@
    Return a pointer to the method's method structure if found.  NULL
    otherwise. */   
 
-static Method_t
+static inline Method_t
 search_for_method_in_hierarchy (Class cls, SEL sel)
 {
   Method_t method = NULL;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]