From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32314 invoked by alias); 7 Oct 2004 00:44:51 -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 32304 invoked from network); 7 Oct 2004 00:44:50 -0000 Received: from unknown (HELO bothner.com) (216.102.199.253) by sourceware.org with SMTP; 7 Oct 2004 00:44:50 -0000 Received: from [192.168.1.10] ([192.168.1.10]) (authenticated bits=0) by bothner.com (8.12.11/8.12.11) with ESMTP id i970rsX6020292 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 6 Oct 2004 17:53:55 -0700 Message-ID: <41649181.7070308@bothner.com> Date: Thu, 07 Oct 2004 01:42:00 -0000 From: Per Bothner User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.2) Gecko/20040803 MIME-Version: 1.0 To: Richard Kenner CC: gcc@gcc.gnu.org Subject: Re: Ada, treelang needs to be converted to --enable-mapped-location References: <10410062329.AA18666@vlsi1.ultra.nyu.edu> In-Reply-To: <10410062329.AA18666@vlsi1.ultra.nyu.edu> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2004-10/txt/msg00260.txt.bz2 Richard Kenner wrote: > > In another thread I proposed a very simple solution. Can you please > > comment on whether it's workable or not? > > No. What I'm talking about is the proposal to use Ada's Sloc as the > source_location and make a language hook that calls expand_location by > default but for Ada, calls a function that's essentially Sloc_to_locus > and expands out the Sloc into (file, line, column). That way there's > exactly one representation of source location in use and one file name > table. It can certainly be made to work. I am not in favor of this change, though, as it requires adding call-back hooks, which are generally to be avoided, and which in this case are unnecessary, even if they make it easier in the short term. However, if you can persuade Zack or some other global write maintainer I won't put up much of a fight. I do think the linemap_find_location api extension I suggested is a better solution: it's a modest localized change for Ada, and doesn't effect the rest of the compiler. There is a slight performance penalty, but I doubt it would be measurable, and it would be partly compensate by reduced call-back indirection. The ideal solution is to change Source_Ptr to be the same as source_location. We're certainly open to moidfying the latter if needed, assuming there is no measurable performance degradation. -- --Per Bothner per@bothner.com http://per.bothner.com/