comp.lang.ada
 help / color / mirror / Atom feed
* Implementation of arrays in Ada compilers.
@ 2021-02-23 18:10 Vincent DIEMUNSCH
  2021-02-24 18:02 ` AdaMagica
  0 siblings, 1 reply; 2+ messages in thread
From: Vincent DIEMUNSCH @ 2021-02-23 18:10 UTC (permalink / raw)


Hello,

I would like to know what is the runtime implementation of arrays used by compilers, and GNAT in particular.

Does an array is represented as an address, a starting index (First) and an ending index (Last) ? Or a First index and a Length.
Is the address the A’First’Address ?
And what about slicing ? Is the address modified ?
And what about passing arrays as reference ?
And what happens when the array is a component of a record :
type OneString (Length : Integer) is
   record
        Data : String(1 .. Length);
   end record;

Is this optimized as a special kind of arrays ?

Is there a paper that discusses these implementation choices ?


Regards,

Vincent

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

end of thread, other threads:[~2021-02-24 18:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-23 18:10 Implementation of arrays in Ada compilers Vincent DIEMUNSCH
2021-02-24 18:02 ` AdaMagica

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