comp.lang.ada
 help / color / mirror / Atom feed
From: dewar@merv.cs.nyu.edu (Robert Dewar)
Subject: Re: rep clause in generics
Date: 1997/03/15
Date: 1997-03-15T00:00:00+00:00	[thread overview]
Message-ID: <dewar.858442437@merv> (raw)
In-Reply-To: E71L14.5Mp@world.std.com


Robert Duff said

<<(As a compiler writer, I find it annoying that 'Size is *ever* static --
it messes up one's compiler design.  You'd like to say 'Size is a
machine-dependent thing, and relegate it to the back end, or some such
late, machine-dependent, phase.  Unfortunately, its value is needed
during overload resolution: e.g.,>>

Interestingly, with GNAT, we have found that the rules about whether 'Size
is static or not are essentially perfect from the point of view of the
organization of tasks between our front and backend. The frontend has no
trouble knowing what Integer'Size is, but it would be hard for it to
know what Rec'Size was even for a record with a single integer field.
If such sizes were static, we would need a completely different design
which would entangle the front end and backend much more extensively.

But having sizes of simple scalar stuff be known to the front end is no
problem for us. (of course I can certainly see why it might cause toruble
in some other design, but given that all you need is a relatively small
table -- not a complex target dependent algorithm -- to know what the
sizes are of primitive data, i don't see it as a problem.





  reply	other threads:[~1997-03-15  0:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-03-14  0:00 rep clause in generics Jonas Nygren
1997-03-14  0:00 ` Robert Dewar
1997-03-20  0:00   ` Nick Roberts
1997-03-14  0:00 ` Robert A Duff
1997-03-15  0:00   ` Robert Dewar [this message]
1997-03-14  0:00 ` Stephen Leake
1997-03-15  0:00   ` Robert Dewar
1997-03-20  0:00   ` Aaro Koskinen
replies disabled

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