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


    My intention by the word "read" was when when the character of the
    source file are read into the compiler's Source_Buffer, which from
    what I gather happens *before* lexing.

    My suggestion that one option is to create thr Source_Ptr ->
    source_location mapping (i.e. data structures to make the mapping
    reasonably efficient) be done more-or-less at the same time as the
    source file is read into a Source_Buffer and Source_Ptr mapping is
    updated.

The problem is that that code is not dependent on the back-end being GCC.
So it's the wrong place to put callbacks into routines that are in the
GCC hierarchy.

The right place for any such code is in ada/trans.c:Sloc_to_locus.  Indeed
I believe that might be the *only* routine that needs to be modified.

Can you take a close look at that function and suggest needed changes to it?

    Yes, but that doesn't preclude using the line_map structure, even with
    non- GCC back-ends.  There is no reason why the Ada front-end can't use
    line_map for a program that say just does analysis and never touches a
    tree or an rtx.

Yes, there is because the Ada front end is also used with back-ends other
than GCC.


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