This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Ada, treelang needs to be converted to --enable-mapped-location


    Are you thinking of some other file?  sinfo.ad[sb] barely mentions
    Source_Ptr at all:  Only in two functions to get/set the End_Span,
    neither of looks like they would need to be changed when converting
    to source_location!

Sorry, indeed I was: sinput.ad[bs].

    The gain is that alternative solutions require mapping between two
    encodings for source locations.  Plus better integration between Ada
    and the rest of the compilers, which *we* think is desirable.  Plus
    using source_location is probably faster, considering what you have to
    go through in Sloc_to_locus (even *before* switching to
    source_location.

But that seems the advantage of what I proposed (see below).

    > In another thread I proposed a very simple solution.  Can you please
    > comment on whether it's workable or not?

    IRC you proposed making a localized change in Sloc_to_locus.  

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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]