* what does preelaborated package mean?
@ 1999-10-26 0:00 mitch
1999-10-26 0:00 ` Matthew Heaney
0 siblings, 1 reply; 4+ messages in thread
From: mitch @ 1999-10-26 0:00 UTC (permalink / raw)
hi Ada experts,
I am studying gnat code, and I see it says in few places that this
package is 'preelaborated' followed by "can thus be with'ed by
preelaborated library units".
what exactly does this mean? I know what elaboration means, which is
done at run time. So, a package that is 'preelaborated', when does
this happen? and if this is a good thing, why not do everything like
that?
thanks,
mitch.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: what does preelaborated package mean?
1999-10-26 0:00 what does preelaborated package mean? mitch
@ 1999-10-26 0:00 ` Matthew Heaney
1999-10-26 0:00 ` Tucker Taft
0 siblings, 1 reply; 4+ messages in thread
From: Matthew Heaney @ 1999-10-26 0:00 UTC (permalink / raw)
In article <7v3m2n$2cpo@drn.newsguy.com> , mitch@nospam wrote:
> what exactly does this mean? I know what elaboration means, which is
> done at run time. So, a package that is 'preelaborated', when does
> this happen? and if this is a good thing, why not do everything like
> that?
Basically, it means that you can't do any initialization of local
objects.
--
Science is, foremost, a method of interrogating reality: proposing
hypotheses that seem true and then testing them -- trying, almost
perversely, to negate them, elevating only the handful that survive to
the status of a theory. Creationism is a doctrine, whose adherents are
interested only in seeking out data that support it.
George Johnson, NY Times, 15 Aug 1999
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: what does preelaborated package mean?
1999-10-26 0:00 ` Matthew Heaney
@ 1999-10-26 0:00 ` Tucker Taft
1999-10-27 0:00 ` Robert Dewar
0 siblings, 1 reply; 4+ messages in thread
From: Tucker Taft @ 1999-10-26 0:00 UTC (permalink / raw)
Matthew Heaney wrote:
>
> In article <7v3m2n$2cpo@drn.newsguy.com> , mitch@nospam wrote:
>
> > what exactly does this mean? I know what elaboration means, which is
> > done at run time. So, a package that is 'preelaborated', when does
> > this happen? and if this is a good thing, why not do everything like
> > that?
>
> Basically, it means that you can't do any initialization of local
> objects.
You can't do any *dynamic* initialization.
You can do static initialization. As a rough equivalent, you
can do the kind of static initialization legal in "C" code, where
there is no run-time elaboration, though there is link-time
initialization of constants and variables.
The goal of "preelaboration" is to eliminate the need to execute
a run-time elaboration routine for the specified package, and rely
strictly on the kind of initialization that most linkers/loaders can
perform.
--
-Tucker Taft stt@averstar.com http://www.averstar.com/~stt/
Technical Director, Distributed IT Solutions (www.averstar.com/tools)
AverStar (formerly Intermetrics, Inc.) Burlington, MA USA
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: what does preelaborated package mean?
1999-10-26 0:00 ` Tucker Taft
@ 1999-10-27 0:00 ` Robert Dewar
0 siblings, 0 replies; 4+ messages in thread
From: Robert Dewar @ 1999-10-27 0:00 UTC (permalink / raw)
In article <38162057.79E96DDC@averstar.com>,
Tucker Taft <stt@averstar.com> wrote:
> The goal of "preelaboration" is to eliminate the need to
execute
> a run-time elaboration routine for the specified package, and
rely
> strictly on the kind of initialization that most
linkers/loaders can
> perform.
Maybe, but it got very confused in the design into serving
multiple purposes, related to distribution and dynamic
elaboration checking.
We added a restriction identifier to GNAT
pragma Restrictions (No_Elaboration_Code);
which achieves what Tuck talks about in a much more direct
manner without getting tied up in these other entanglements.
This pragma is both more and less restrictive than pragma
Preelaborate.
Sent via Deja.com http://www.deja.com/
Before you buy.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~1999-10-27 0:00 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-10-26 0:00 what does preelaborated package mean? mitch
1999-10-26 0:00 ` Matthew Heaney
1999-10-26 0:00 ` Tucker Taft
1999-10-27 0:00 ` Robert Dewar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox