public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: oliver.kellogg@t-online.de (Oliver Kellogg)
To: gcc@gcc.gnu.org
Subject: Re: [gnat] reuse of ASTs already constructed
Date: Mon, 20 Apr 2009 05:14:00 -0000	[thread overview]
Message-ID: <1240175954.4554.50.camel@tidbit.site> (raw)
In-Reply-To: <1240083309.4554.45.camel@tidbit.site>

<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	other threads:[~2009-04-19 21:13 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-13 16:30 Oliver Kellogg
2009-04-14 14:10 ` Oliver Kellogg
2009-04-19 18:48 ` Oliver Kellogg
2009-04-20  5:14   ` Oliver Kellogg [this message]
2009-05-03 21:14     ` Oliver Kellogg
2009-05-03 21:17       ` Robert Dewar
2009-05-03 21:22         ` Oliver Kellogg
2009-05-04  1:14           ` Robert Dewar
2009-05-04  5:31             ` Oliver Kellogg
2009-05-04 12:23               ` Dave Korn
2009-05-09 20:09               ` Oliver Kellogg
2009-05-09 20:42                 ` Robert Dewar
2009-06-15 20:38                   ` Oliver Kellogg
2009-06-17  4:20                     ` Oliver Kellogg
2009-06-28 22:45                   ` Oliver Kellogg
2009-05-08 21:13       ` Tom Tromey
2009-04-20 18:40 ` Geert Bosch
2009-04-20 20:34   ` Oliver Kellogg
2009-04-20 21:12     ` Geert Bosch
2009-04-20 21:35       ` Oliver Kellogg
2009-04-27  6:18       ` Oliver Kellogg
2009-04-27  8:29         ` Robert Dewar
2009-04-27 18:36         ` Ian Lance Taylor
2009-04-27 18:47           ` Oliver Kellogg
2009-04-27 19:47         ` Tom Tromey
2009-04-27 22:09           ` Oliver Kellogg
2009-04-27 22:26             ` Tom Tromey
2009-04-27 22:44               ` Oliver Kellogg
  -- strict thread matches above, loose matches on Subject: below --
2012-07-07 20:33 Oliver Kellogg
2012-06-23 18:22 Oliver Kellogg
2012-06-23 22:23 ` Arnaud Charlet
2012-06-17 15:12 Oliver Kellogg
2012-04-15 19:22 oliver.kellogg
2012-04-06 20:24 oliver.kellogg
2012-04-10 10:20 ` Arnaud Charlet
     [not found] <1240349826.4554.76.camel@tidbit.site>
     [not found] ` <49EE4D58.8020404@adacore.com>
     [not found]   ` <1240437226.4554.101.camel@tidbit.site>
     [not found]     ` <49EF9892.1010703@adacore.com>
     [not found]       ` <1246487007.4507.76.camel@tidbit.site>
2009-08-26 18:39         ` Oliver Kellogg
2009-09-27 22:48           ` Oliver Kellogg
2003-03-04 22:03 Robert Dewar
2003-03-04 20:42 Robert Dewar
2003-03-04 21:01 ` Oliver Kellogg
2003-03-04 22:03   ` Geert Bosch
2003-03-04 17:08 Oliver Kellogg
2003-03-04 20:07 ` Geert Bosch
2003-03-04 20:49   ` Oliver Kellogg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1240175954.4554.50.camel@tidbit.site \
    --to=oliver.kellogg@t-online.de \
    --cc=gcc@gcc.gnu.org \
    --cc=okellogg@users.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).