Eric Botcazou wrote:

On the other hand, I don't see any fundamental reasons why we couldn't use Gigi to shield the Ada front-end from the differences in the representation of source locations between successive generations of the core compiler.

That sounds reasonable. I don't think it is practical for the front end
to use the gcc mapped locations for its own use, since it lacks a number
of critical properties (including full representation of generic
instantiations, and efficient comparisons within a unit to determine if one source location is before or after another), but it would certainly be possible for gigi to convert the source locations to whatever form the back end wants to use.

Is there no abstract interface that would shield *any*
front end from "differences in representation of source locations
between successive generations of the core compiler"? Certainly we
have made major changes in the GNAT representation without any change
at all in clients (except to take advantage of new features).

It seems to me that clients should know nothing whatever about the
representation of source locations. The only invariant required by
the GNAT front end is that source locations fit in 32-bits (since
this accomodates up to 4 gigabytes of source in any one compilation,
that sounds enough for ever!)


Reply via email to