From: "oliver.kellogg@t-online.de" <oliver.kellogg@t-online.de>
To: gcc@gcc.gnu.org
Subject: Re: [gnat] reuse of ASTs already constructed
Date: Fri, 06 Apr 2012 20:24:00 -0000 [thread overview]
Message-ID: <1SGFhL-0ALG3E0@fwd17.aul.t-online.de> (raw)
[-- Attachment #1: Type: text/plain, Size: 1571 bytes --]
I am finally finding some some time to continue this work,
having left off with
http://gcc.gnu.org/ml/gcc/2009-08/msg00475.html :
> [...]
> There are two problems right now:
>
> 1) Mixing of Ada.Text_IO and Text_IO as described at
> http://gcc.gnu.org/ml/gcc-help/2009-08/msg00113.html
The solution to this one turned out to be quite simple, see attached patch.
Sem_Ch12.Analyze_Package_Instantiation calls Rtsfind.Text_IO_Kludge,
and the latter contains:
if Chrs in Text_IO_Package_Name then
for U in Main_Unit .. Last_Unit loop
Get_Name_String (Unit_File_Name (U));
...
On compiling the second file, Main_Unit is not 0 but some larger value.
The existing node for Text_IO was not being found because it is at an
index smaller than the current Main_Unit. The solution was to start the
loop at index 0.
I will now start looking into the second problem,
> 2) The 'X' lines in the ALI files are not what they should be.
> This is due to the fact that Lib.Xref.Generate_(Definition|Reference) is
> called during semantic analysis. However, when I discover that a
> tree was already built for a main unit by a previous compilation,
> Sem is not redone for that tree. Depending on whether
> Lib.Xref.Initialize is called per-job or per-file, this leads to either
> too much or too little cross ref info.
By the way, I am currently using trunk r152433 (4.5.0 pre-release) and
moving forward to the 4.5.0 release.
When that is done: Should I continue on trunk or switch to the
gcc-4_5-branch ?
Thanks,
Oliver
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch; name="rtsfind.adb.diff", Size: 472 bytes --]
Index: rtsfind.adb
===================================================================
--- rtsfind.adb (revision 152433)
+++ rtsfind.adb (working copy)
@@ -1406,7 +1406,7 @@
-- or [Wide_]Wide_Text_IO already loaded, then load the proper child.
if Chrs in Text_IO_Package_Name then
- for U in Main_Unit .. Last_Unit loop
+ for U in 0 .. Last_Unit loop
Get_Name_String (Unit_File_Name (U));
if Name_Len = 12 then
next reply other threads:[~2012-04-06 20:24 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-06 20:24 oliver.kellogg [this message]
2012-04-10 10:20 ` Arnaud Charlet
-- 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
[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
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
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
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=1SGFhL-0ALG3E0@fwd17.aul.t-online.de \
--to=oliver.kellogg@t-online.de \
--cc=gcc@gcc.gnu.org \
/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).