comp.lang.ada
 help / color / mirror / Atom feed
From: bobduff@world.std.com (Robert A Duff)
Subject: Re: seperate keyword and seperate compilation with Gnat?
Date: 1996/07/08
Date: 1996-07-08T00:00:00+00:00	[thread overview]
Message-ID: <Du88uz.JLn@world.std.com> (raw)
In-Reply-To: dewar.836427220@schonberg


In article <dewar.836427220@schonberg>, Robert Dewar <dewar@cs.nyu.edu> wrote:
>We have looked into this issue recently, and here is one interesting
>observation. There are two quite different types of subunits:
>
>   1. Those which are ultimately nested within a procedure
>
>   2. Those which are ultimately nested within a library level package
>
>For example, if you have a package spec with a bunch of subprograms, and
>then a package body, where the  bodies of the subprograms are stubs, this
>would be type 2 subunits.

It seems to me that the hardest kind of subunit to compile is when the
parent is a subprogram, and the subunit is a package.  The "am I a task
master?" issue that was mentioned only applies in this case, for
example.

>Anyway, it would really be interesting to here if there are interesting
>examples of large type 2 cases which would make it worth fixing at least
>this subunit case to do "true" separate compilation.

I suspect that most subunits are subprograms, and their parents are most
often packages.  That's true of most code I've seen, and code I've
written myself.

On the other hand, I'm pretty happy with GNAT subunit handling as it is,
since I'm pretty happy to use child units instead.  What can subunits do
that child units can't?  Well, a subunit can see stuff in the parent's
body.  But that's not a big deal -- just move that stuff to a private
child package, and then you can turn your subunit into a child.  (I'm
not claiming that this is feasible for existing code -- just that if
you're writing new code, and you think about it ahead of time, it's
generally pretty easy to use child units instead of subunits.)

- Bob




  parent reply	other threads:[~1996-07-08  0:00 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-07-02  0:00 seperate keyword and seperate compilation with Gnat? David Morton
1996-07-02  0:00 ` Robert Dewar
1996-07-18  0:00   ` Peter Hermann
1996-07-20  0:00     ` Robert Dewar
1996-07-02  0:00 ` Samuel Mize
1996-07-03  0:00   ` *separate* keyword and *separate* " David Morton
1996-07-03  0:00     ` Robert Dewar
1996-07-03  0:00   ` seperate keyword and seperate " Robert Dewar
1996-07-17  0:00   ` Robert I. Eachus
1996-07-02  0:00 ` Peter Hermann
1996-07-02  0:00   ` David Morton
1996-07-03  0:00 ` Rob Kirkbride
1996-07-03  0:00   ` Robert Dewar
1996-07-08  0:00     ` John Herro
1996-07-08  0:00       ` Robert Dewar
1996-07-10  0:00         ` John Herro
1996-07-10  0:00           ` Robert Dewar
1996-07-08  0:00       ` Robert Dewar
1996-07-09  0:00       ` Robert A Duff
1996-07-09  0:00         ` Robert Dewar
1996-07-09  0:00       ` progers
1996-07-08  0:00     ` michael
1996-07-08  0:00       ` Robert Dewar
1996-07-11  0:00         ` Robert A Duff
1996-07-11  0:00           ` Robert Dewar
1996-07-12  0:00             ` David Morton
1996-07-12  0:00               ` Robert Dewar
1996-07-16  0:00                 ` Michael Paus
1996-07-08  0:00     ` Robert A Duff [this message]
1996-07-03  0:00   ` Robert A Duff
1996-07-03  0:00 ` Mike Card (x3022)
1996-07-04  0:00 ` Jon S Anthony
1996-07-03  0:00   ` Robert Dewar
1996-07-03  0:00   ` Robert Dewar
1996-07-04  0:00   ` Robert A Duff
1996-07-05  0:00 ` Jon S Anthony
1996-07-06  0:00   ` Robert Dewar
1996-07-05  0:00 ` Jon S Anthony
1996-07-09  0:00 ` Jon S Anthony
1996-07-09  0:00 ` Jon S Anthony
1996-07-09  0:00   ` Robert Dewar
1996-07-12  0:00   ` Jon S Anthony
1996-07-21  0:00     ` Robert A Duff
1996-07-11  0:00 ` Jon S Anthony
1996-07-11  0:00   ` Robert A Duff
1996-07-12  0:00   ` Robert Dewar
1996-07-14  0:00 ` Norman H. Cohen
1996-07-15  0:00   ` Robert Dewar
1996-07-15  0:00 ` Jon S Anthony
1996-07-15  0:00   ` Robert Dewar
1996-07-16  0:00 ` Jon S Anthony
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox