comp.lang.ada
 help / color / mirror / Atom feed
From: Vincent DIEMUNSCH <vincent.diemunsch@gmail.com>
Subject: Implementation of arrays in Ada compilers.
Date: Tue, 23 Feb 2021 10:10:09 -0800 (PST)	[thread overview]
Message-ID: <26970fc6-91e1-4943-bf2a-aa546df25c36n@googlegroups.com> (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

             reply	other threads:[~2021-02-23 18:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-23 18:10 Vincent DIEMUNSCH [this message]
2021-02-24 18:02 ` Implementation of arrays in Ada compilers AdaMagica
replies disabled

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