From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14176 invoked by alias); 23 Jan 2008 11:40:27 -0000 Received: (qmail 14153 invoked by uid 22791); 23 Jan 2008 11:40:27 -0000 X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 23 Jan 2008 11:40:07 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id m0NBe4Bl023572; Wed, 23 Jan 2008 06:40:04 -0500 Received: from [10.11.14.7] (vpn-14-7.rdu.redhat.com [10.11.14.7]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id m0NBe2HZ028017; Wed, 23 Jan 2008 06:40:02 -0500 Message-ID: <47972791.8020404@redhat.com> Date: Wed, 23 Jan 2008 11:40:00 -0000 From: Andrew Haley User-Agent: Thunderbird 1.5.0.12 (X11/20071019) MIME-Version: 1.0 To: David Daney CC: Tom Tromey , Java Patch List , gcc-patches Subject: Re: [Patch 2/2] Make java compiled resources public. References: <478C061B.1040003@avtrex.com> <478C0AFD.4040203@avtrex.com> <4796676D.2030307@avtrex.com> In-Reply-To: <4796676D.2030307@avtrex.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact java-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-patches-owner@gcc.gnu.org X-SW-Source: 2008-q1/txt/msg00025.txt.bz2 David Daney wrote: > Tom Tromey wrote: >>>>>>> "David" == David Daney writes: >>>>>>> >> David> OK to commit? >> >> There are some whitespace problems with this patch, but otherwise it >> is ok. Thanks. >> > This is an alternative version that I think may be better. From IRC: > > (11:47:20 AM) iant_work: daney: I suppose the alternative scheme would > be to use a single string, and also use an encoding for '/' > (11:47:31 AM) iant_work: is there an advantage to breaking it up? > (11:47:39 AM) iant_work: I don't care all that much myself > (11:49:18 AM) daney: I had considered that. Internally to the java > runtime the breaking of the names on '/' signify parts of a path, but as > far as the name is concerned, it probably does not matter. > (11:49:59 AM) iant_work: daney: I don't care all that much; the mangling > will be simpler if you use a single string; but if separate strings is > better for some reason, it's OK with me > (11:50:45 AM) daney: The mangling would be shorter with a single string. > I will change it. > > The new version has the form: _ZGr##escaped_name, where ## is the length > of the escaped name. I think the code (in jc1 as well as the > un-mangler) is cleaner and the mangled names are shorter (or the same > length). > > This new version also bootstrapped on x86_64 with no failures in libjava. > > OK to commit, or do you think the previous version is preferable? > > 2008-01-22 David Daney > > * class.c (hide) Rename to... > (java_hide_decl) ... this throughout, and make public. > * resource.c (Jr_count): Remove. > (compile_resource_data): Call java_mangle_resource_name to generate > decl name. Make resource decl public and hidden. > * mangle.c (java_mangle_resource_name): New function. > * java-tree.h (java_hide_decl, java_mangle_resource_name): Declare > functions. > This looks good, thanks. One small nit: please don't use identifiers such as "n" as names of variables of pointer type. :-) Otherwise OK. Andrew.