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: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- To: per at bothner dot com
- Cc: gcc at gcc dot gnu dot org
- Date: Wed, 6 Oct 04 08:50:02 EDT
- Subject: 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.