From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=0.8 required=3.0 tests=BAYES_50,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.5-pre1 X-Received: by 2002:a37:a408:: with SMTP id n8mr1534069qke.6.1614103810766; Tue, 23 Feb 2021 10:10:10 -0800 (PST) X-Received: by 2002:a25:e4c4:: with SMTP id b187mr41004875ybh.92.1614103810068; Tue, 23 Feb 2021 10:10:10 -0800 (PST) Path: eternal-september.org!reader02.eternal-september.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Tue, 23 Feb 2021 10:10:09 -0800 (PST) Injection-Info: google-groups.googlegroups.com; posting-host=176.151.7.118; posting-account=hya6vwoAAADTA0O27Aq3u6Su3lQKpSMz NNTP-Posting-Host: 176.151.7.118 User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <26970fc6-91e1-4943-bf2a-aa546df25c36n@googlegroups.com> Subject: Implementation of arrays in Ada compilers. From: Vincent DIEMUNSCH Injection-Date: Tue, 23 Feb 2021 18:10:10 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: reader02.eternal-september.org comp.lang.ada:61427 List-Id: Hello, I would like to know what is the runtime implementation of arrays used by c= ompilers, 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=E2=80=99First=E2=80=99Address ? 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 :=E2=80=AFString(1 .. Length); end record; Is this optimized as a special kind of arrays ? Is there a paper that discusses these implementation choices ? Regards, Vincent