From patchwork Fri Jun 3 17:02:18 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicola Pero X-Patchwork-Id: 98607 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 22060B6FA6 for ; Sat, 4 Jun 2011 03:02:47 +1000 (EST) Received: (qmail 4057 invoked by alias); 3 Jun 2011 17:02:45 -0000 Received: (qmail 4048 invoked by uid 22791); 3 Jun 2011 17:02:44 -0000 X-SWARE-Spam-Status: No, hits=-0.0 required=5.0 tests=AWL, BAYES_50, SARE_SUB_ENC_UTF8, TW_BJ, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from fencepost.gnu.org (HELO fencepost.gnu.org) (140.186.70.10) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 03 Jun 2011 17:02:24 +0000 Received: from eggs.gnu.org ([140.186.70.92]:46748) by fencepost.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1QSXlP-00010r-5o for gcc-patches@gnu.org; Fri, 03 Jun 2011 13:02:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QSXlN-0008UX-Dj for gcc-patches@gnu.org; Fri, 03 Jun 2011 13:02:22 -0400 Received: from smtp171.iad.emailsrvr.com ([207.97.245.171]:59936) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QSXlN-0008UL-2X for gcc-patches@gnu.org; Fri, 03 Jun 2011 13:02:21 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp27.relay.iad1a.emailsrvr.com (SMTP Server) with ESMTP id 9E9261183F3 for ; Fri, 3 Jun 2011 13:02:18 -0400 (EDT) Received: from dynamic8.wm-web.iad.mlsrvr.com (dynamic8.wm-web.iad1a.rsapps.net [192.168.2.149]) by smtp27.relay.iad1a.emailsrvr.com (SMTP Server) with ESMTP id 8C7A91183A4 for ; Fri, 3 Jun 2011 13:02:18 -0400 (EDT) Received: from meta-innovation.com (localhost [127.0.0.1]) by dynamic8.wm-web.iad.mlsrvr.com (Postfix) with ESMTP id 6AFF8305006E for ; Fri, 3 Jun 2011 13:02:18 -0400 (EDT) Received: by www2.webmail.us (Authenticated sender: nicola.pero@meta-innovation.com, from: nicola.pero@meta-innovation.com) with HTTP; Fri, 3 Jun 2011 19:02:18 +0200 (CEST) Date: Fri, 3 Jun 2011 19:02:18 +0200 (CEST) Subject: =?utf-8?Q?libobjc=3A_remove_deprecated_API_=28patch_4=29?= From: "Nicola Pero" To: "gcc-patches@gnu.org" MIME-Version: 1.0 X-Type: plain Message-ID: <1307120538.436923575@www2.webmail.us> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 207.97.245.171 X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org This patch removes -forward:: from Object. I was planning to do this later, but the previous patch (patch 3) removed -doesNotRecognize:, which was used in the default implementation of -forward::, which generates some ugly warnings when compiling. Removing -forward:: removes the warnings. Please note that at this stage the runtime may still invoke -forward:: if you have it implemented in your own class, and have not installed a custom forwarding routine. There are testcases in the GCC testsuite that test this. This will all go away later, and will require removing the testcases, but at the same time I'd like to add new testcases for __objc_msg_forward and __objc_msg_forward2, which are the actual hooks used in practice by users of libobjc, but which currently are not really tested. For now, this patch just removes [Object -forward::], which is deprecated, and makes libobjc compile again without warnings. Committed to trunk. Thanks Index: sendmsg.c =================================================================== --- sendmsg.c (revision 174593) +++ sendmsg.c (working copy) @@ -936,9 +936,12 @@ __objc_block_forward (id rcv, SEL op, ...) } -/* This function is installed in the dispatch table for all methods - which are not implemented. Thus, it is called when a selector is - not recognized. */ +/* This function is called for methods which are not implemented, + unless a custom forwarding routine has been installed. Please note + that most serious users of libobjc (eg, GNUstep base) do install + their own forwarding routines, and hence this is never actually + used. But, if no custom forwarding routine is installed, this is + called when a selector is not recognized. */ static retval_t __objc_forward (id object, SEL sel, arglist_t args) { Index: ChangeLog =================================================================== --- ChangeLog (revision 174594) +++ ChangeLog (working copy) @@ -1,5 +1,11 @@ 2011-06-03 Nicola Pero + * Object.m ([-forward::]): Removed. + * objc/deprecated/Object.h ([-forward::]): Removed. + * sendmsg.c (__objc_forward): Updated comments. + +2011-06-03 Nicola Pero + * Makefile.in (OBJC_H): Removed objc-list.h. (OBJC_DEPRECATED_H): Removed objc-list.h. * objc/objc-list.h: File removed. Index: Object.m =================================================================== --- Object.m (revision 174593) +++ Object.m (working copy) @@ -248,12 +248,6 @@ see the files COPYING3 and COPYING.RUNTIME respect :class_get_class_method(self->isa, aSel))); } -- (retval_t)forward:(SEL)aSel :(arglist_t)argFrame -{ - (void) argFrame; /* UNUSED */ - return (retval_t)[self doesNotRecognize: aSel]; -} - - (retval_t)performv:(SEL)aSel :(arglist_t)argFrame { return objc_msg_sendv(self, aSel, argFrame); Index: objc/deprecated/Object.h =================================================================== --- objc/deprecated/Object.h (revision 174593) +++ objc/deprecated/Object.h (working copy) @@ -49,7 +49,6 @@ - (struct objc_method_description *)descriptionForMethod:(SEL)aSel; /* Forwarding */ -- (retval_t)forward:(SEL)aSel :(arglist_t)argFrame; - (retval_t)performv:(SEL)aSel :(arglist_t)argFrame; /* Posing */