From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,91d0d8cd28bbb477 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!out03a.usenetserver.com!news.usenetserver.com!in01.usenetserver.com!news.usenetserver.com!news.tele.dk!news.tele.dk!small.news.tele.dk!lnewsinpeer00.lnd.ops.eu.uu.net!bnewsinpeer00.bru.ops.eu.uu.net!emea.uu.net!newsfeed.arcor.de!newsspool3.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: Implementing an Ada compiler and libraries. Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <1178721451.073700.10730@y80g2000hsf.googlegroups.com> Date: Wed, 9 May 2007 18:51:27 +0200 Message-ID: <6819scxft9y4$.1vlh83ppnnyrh$.dlg@40tude.net> NNTP-Posting-Date: 09 May 2007 18:51:22 CEST NNTP-Posting-Host: c0e2ce29.newsspool2.arcor-online.net X-Trace: DXC=bgOF0dd?UbRYQ5E:l On 9 May 2007 07:37:31 -0700, Lucretia wrote: > I've read some older threads from 1994-1995 which cover how older > compilers implemented a repository based Ada standard library in which > compilations units were added to. > > But I'm interested in seeing how I can get the compiler to not have to > reparse other source files (when with'd) in order to compile a unit. Why should it? Certainly, you would have some intermediate representation which includes symbolic tables and other stuff the compiler creates after semantic analysis before code generation. A compiled library unit will have this stored in some appropriate format. An interesting issue is cross-platform library units, I was playing with this idea, but came to no conclusion. > Also, I'd like to see how static/shared libraries can be implemented/ > used to extend the Ada standard library. I don't think it is a good idea to mix Ada libraries and object/dynamic-linking libraries, at least in existing OS'es. In some OO OS with advanced containers it could work. But still, these are two different abstraction levels. Object code is too close to the hardware. The library units should probably be kept on the other side. > I don't want to have to have > tons of source files lying around for a static/shared library, I > honestly don't see the need. Surely, it's possible to build a compiler > that can get the information it needs from the library itself (or at > least a companion library rather than a ton of different ALI files)? Or a database, for that matter... > Now, I'd really like to hear from people who have implemented an Ada > compiler and people who have used other compilers (I've only used > GNAT). Basically, I'm interested in how other implementations handle > the library. Note that there are 2 ideas of library here: > > 1) The standard Ada library. > 2) Link/shared libraries found on operating systems. I remember RSX-11 in which macro and object libraries were handled by the same librarian tool. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de