comp.lang.ada
 help / color / mirror / Atom feed
From: dewar@merv.cs.nyu.edu (Robert Dewar)
Subject: Re: gnat310p on NT
Date: 1998/08/16
Date: 1998-08-16T00:00:00+00:00	[thread overview]
Message-ID: <dewar.903280841@merv> (raw)
In-Reply-To: 35D4C134.138C@erols.com

Stephen says

<<You may be remembering that GNAT (let's get the capitalization right :)
doesn't separately compile separate units (ie, doesn't produce an object
file). But since 'separate' is Ada syntax, GNAT does it - by compiling
the separate body when the parent body is compiled. At the risk of
sounding heretical, think of 'separate' as '#include'.
>>


No, that's not right, GNAT can fully compile separates in the sense of
the RM, e.g. checking for all semantic errors, as required by the RM, and
as is most certainly NOT possible for #include as used in C.

What GNAT does is to delay the generation of object code until the
parent is compiled. This delay is an optimization that ensures the
generation of efficient code without any penalty from the use of
separates. In many Ada compilers, the separate generation of code
means that worst case assumptions have to be made (e.g. the parent 
has to assume that tasks *might* be present in a subunit), and 
consequently there is a runtime penalty for the use of subunits.

Robert Dewar
Ada Core Technologies





  reply	other threads:[~1998-08-16  0:00 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <01bdc744$cef04bc0$0e2915c0@w95>
1998-08-14  0:00 ` gnat310p on NT David C. Hoos, Sr.
1998-08-14  0:00   ` Robert Dewar
1998-08-15  0:00     ` Andi Kleen
1998-08-16  0:00       ` Robert Dewar
1998-08-16  0:00     ` Chris Morgan
1998-08-14  0:00   ` dennison
1998-08-14  0:00     ` Stephen Leake
1998-08-16  0:00       ` Robert Dewar [this message]
1998-08-14  0:00     ` Robert Dewar
1998-08-14  0:00   ` Martin C. Carlisle
1998-08-15  0:00   ` bob
1998-08-15  0:00     ` David C. Hoos, Sr.
1998-08-14  0:00 ` Robert Dewar
1998-08-14  0:00 ` Robert Dewar
replies disabled

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