<PING> Anybody out there?

How about not doing the name expansion in-place but rather
storing the expanded name in an extra node field?

--Oliver


On 2009-04-18 at 21:35 +0200, Oliver Kellogg wrote:
> I've run up against a problem with reusing the GNAT trees:
> Apparently during semantic analysis entity names are expanded
> to their fully qualified names in the tree.
> 
> For example, when compiling the following file with the node
> for System already installed by a previous compilation,
> 
> -- file: ext.ads
> with System;
> procedure Ext (Addr : System.Address);
> 
> I get the following error from sem_ch8.adb Find_Expanded_Name
> during semantic analysis of the above System.Address,
> 
> ext.ads:3:29: "Address" is not a visible entity of "System"
> 
> This is because in sem_ch8.adb:4482,
> 
>   if No (Id) or else Chars (Id) /= Chars (Selector) then ...
> 
> the second part of the condition becomes true as Chars(Id) is
> "system__address" [and Chars(Selector) is "address"].
> When compiling the same file afresh without preinstalled nodes,
> Chars(Id) is just "address" and all is fine.
> 
> Oliver
> 
> 
> On 2009-04-12 at 19:29 +0200, Oliver Kellogg wrote:
> > Picking up an old thread,
> > http://gcc.gnu.org/ml/gcc/2003-03/msg00281.html
> > 
> > 
> > On Tue, 4 Mar 2003, Geert Bosch <bosch at gnat dot com> wrote:
> > > [...]
> > > Best would be to first post a design overview,
> > > before doing a lot of work in order to prevent spending time
> > > on implementing something that may turn out to have fundamental
> > > problems.
> > 
> > I've done a little experimenting to get a feel for this.
> > 
> > I've looked at the work done toward the GCC compile server but
> > decided that I want to concentrate on GNAT trees (whereas the
> > compile server targets the GNU trees.)
> > 
> > Also I am aiming somewhat lower - not making a separate compile
> > server process but rather extending gnat1 to handle multiple
> > files in a single invocation.
> > 
> > The current GNAT code makes a strong assumption that there be
> > only one main unit, and this Main_Unit be located at index 0 of
> > Lib.Units.Table (see procedure Lib.Load.Load_Main_Source).
> > 
> > I am currently looking at having each main unit supplied on
> > the gnat1 command line overwrite the Main_Unit in the Units table.
> > 
> > What do you think of this approach?
> > 
> > The attached patch sets the stage for passing multiple source
> > files to a single gnat1 invocation. (Beware, this is a rough cut.
> > Best use "svn diff --diff-cmd diff -x -uw" after applying as
> > there are many changes that only affect indentation.)
> > 
> > Thanks,
> > 
> > Oliver
> > 
> > 

Reply via email to