From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19996 invoked by alias); 14 Oct 2004 21:14:16 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 19983 invoked from network); 14 Oct 2004 21:14:14 -0000 Received: from unknown (HELO mail-out3.apple.com) (17.254.13.22) by sourceware.org with SMTP; 14 Oct 2004 21:14:14 -0000 Received: from mailgate2.apple.com (a17-128-100-204.apple.com [17.128.100.204]) by mail-out3.apple.com (8.12.11/8.12.11) with ESMTP id i9ELIg3S023514 for ; Thu, 14 Oct 2004 14:18:42 -0700 (PDT) Received: from relay3.apple.com (relay3.apple.com) by mailgate2.apple.com (Content Technologies SMTPRS 4.3.14) with ESMTP id ; Thu, 14 Oct 2004 14:14:13 -0700 Received: from [17.201.24.57] (polskifiat.apple.com [17.201.24.57]) by relay3.apple.com (8.12.11/8.12.11) with ESMTP id i9ELEBAK029996; Thu, 14 Oct 2004 14:14:12 -0700 (PDT) In-Reply-To: <416E8E83.7000409@inode.at> References: <728118AE-1BD1-11D9-9ABE-000D9330C50E@apple.com> <416E8E83.7000409@inode.at> Mime-Version: 1.0 (Apple Message framework v619) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: Content-Transfer-Encoding: 7bit Cc: gcc List , objc-language@lists.apple.com From: Ziemowit Laski Subject: Re: RFC: Enhancing ObjC message lookup in the presence of protocols Date: Fri, 15 Oct 2004 03:32:00 -0000 To: David Ayers X-SW-Source: 2004-10/txt/msg00594.txt.bz2 On 14 Oct 2004, at 7.34, David Ayers wrote: >> My proposal to attack this problem goes as follows: Whenever we see >> an interface or category declaration, we examine the protocols >> adopted by said interface/category and insert their constituent >> method signature into the global class or instance method hash tables >> (as is already being done for methods declared by the >> interface/category directly). Also, whenever we are dealing with a >> root class (or a category of a root class), we add any instance >> methods from the adopted protocols into the global class hash table >> (just as instance methods directly declared by root classes and >> categories already are). > > Isn't this exactly what my patch did? The main reason I had to mark > the > protocols adopted by root is for the case of forward declared protocols > adopted by root classes in which case we haven't seen the methods yet. Your patch did more than that, I think, but overall you do raise a good point. Either we should handle forward-declared protocols as you suggest, or else I should drop the second part of my proposal. At any rate, let's defer this to the next patch, and separate it from adding 'Class ' to the compiler in the first place. > PS: Will you also send a mail concerning the semantic changes to > objc_comptypes that your implementation has introduced? I do agree > with > some of them, but I don't think that they should be part of this patch. Which ones do you mean? I did notice that objc_comptypes is buggy in some cases (marked as FIXMEs in class-protocol-1.m), but I resisted mission creep in that case, since these bugs can be fixed as part of a future objc_comptypes rewrite. Aside from this, do you see any other problems with my current patch? I know it still doesn't do everything you want, and you do raise a good point about forward-declared protocols, but we should separate concerns here and attack remaining problems with a separate patch. Thanks, --Zem -------------------------------------------------------------- Ziemowit Laski 1 Infinite Loop, MS 301-2K Mac OS X Compiler Group Cupertino, CA USA 95014-2083 Apple Computer, Inc. +1.408.974.6229 Fax .5477