comp.lang.ada
 help / color / mirror / Atom feed
* Re: generic instantiation question ...
  1995-04-19  0:00 ` generic instantiation question Mike Meier
@ 1995-04-19  0:00   ` Robert Dewar
  0 siblings, 0 replies; 2+ messages in thread
From: Robert Dewar @ 1995-04-19  0:00 UTC (permalink / raw)


I do not think Alsys has ever produced an Ada compiler which used shared
generic code. The switch you are thinking of was probably the subunit mode
switch which is something completely different, you get code duplication
either way.

Some Ada compilers do code sharing, notably RR and Rational (which only do
it this way), and Dec (where it is optional)> I think VADS can also used
shared generics, at least in some cases.





^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: generic instantiation question ...
       [not found] <1995Apr16.121025.28242@news.cs.indiana.edu>
@ 1995-04-19  0:00 ` Mike Meier
  1995-04-19  0:00   ` Robert Dewar
  0 siblings, 1 reply; 2+ messages in thread
From: Mike Meier @ 1995-04-19  0:00 UTC (permalink / raw)


Paul Hager (hagerp@cs.indiana.edu) wrote:
: Q:      Is machine code generated every time a generic is
:         instantiated?  In other words, does each "copy" of
:         the generic generate additional code?

If I remember correctly, our Alsys compiler actually has a compiler
switch which allows us to select whether separate copies are made
for each instantiation or a shared copy is used.  Of course,
you can't have it one way for some generics and another way for
others, but that seems a reasonable limitation when you think of all
the implementation trade-offs.  I expect that other compilers have
similar capabilities.

Mike Meier
Magnavox Electronic Systems Company




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1995-04-19  0:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1995Apr16.121025.28242@news.cs.indiana.edu>
1995-04-19  0:00 ` generic instantiation question Mike Meier
1995-04-19  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