This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Ada, treelang needs to be converted to --enable-mapped-location
- From: Laurent GUERBY <laurent at guerby dot net>
- To: Robert Dewar <dewar at gnat dot com>
- Cc: Richard Kenner <kenner at vlsi1 dot ultra dot nyu dot edu>, mark at codesourcery dot com, gcc at gcc dot gnu dot org
- Date: Thu, 07 Oct 2004 09:18:56 +0200
- Subject: Re: Ada, treelang needs to be converted to --enable-mapped-location
- References: <10410070209.AA19737@vlsi1.ultra.nyu.edu> <4164D10C.1080104@gnat.com>
Has anyone looked at wether the -gnatD switch (where
all sloc will be pointing to virtual files generated
by the front-end after scanning and not real source files),
is relevant to this design discussion?
Laurent
On Thu, 2004-10-07 at 07:15, Robert Dewar wrote:
> Richard Kenner wrote:
>
> > (2) If we do it in Gigi, the issue is that the line-map code expects to see
> > locations created in increasing order, but there's no guarantee that the
> > nodes will be processed in that order.
>
> Note that even the initial creation of source locations in the GNAT
> front end does not meet the requirement of creating locations in
> increasing order, because of scan backup.
>
>
> > My proposal is basically to take the view that source_location is an unsigned
> > int that's an opaque datatype used to encode a (file, line column) triple.
> > This datatype can either be defined in the front end (in which case it
> > provides a language hook to produce that triple from the encoding) or it can
> > use routines provided in line-map.c to generate the encoding.
>
> That really seems easier to me, given especially that the concept
> of locations is language dependent wrt things like generic instantiation.