This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[Patch]: minor inlining in Objective-C runtime
- To: gcc-patches at gcc dot gnu dot org
- Subject: [Patch]: minor inlining in Objective-C runtime
- From: Nicola Pero <n dot pero at mi dot flashnet dot it>
- Date: Sun, 22 Apr 2001 16:07:01 +0100 (BST)
- Reply-To: n dot pero at mi dot flashnet dot it
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;