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=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham 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!postnews.google.com!u30g2000hsc.googlegroups.com!not-for-mail From: Lucretia Newsgroups: comp.lang.ada Subject: Re: Implementing an Ada compiler and libraries. Date: 9 May 2007 10:21:20 -0700 Organization: http://groups.google.com Message-ID: <1178731280.075981.23040@u30g2000hsc.googlegroups.com> References: <1178721451.073700.10730@y80g2000hsf.googlegroups.com> <6819scxft9y4$.1vlh83ppnnyrh$.dlg@40tude.net> NNTP-Posting-Host: 62.56.81.180 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1178731288 31615 127.0.0.1 (9 May 2007 17:21:28 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 9 May 2007 17:21:28 +0000 (UTC) In-Reply-To: <6819scxft9y4$.1vlh83ppnnyrh$.dlg@40tude.net> User-Agent: G2/1.0 X-HTTP-UserAgent: Opera/9.10 (X11; Linux i686; U; en),gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: u30g2000hsc.googlegroups.com; posting-host=62.56.81.180; posting-account=G-J9fgwAAADgpzBiEyy5tO4f8MX5fbpw Xref: g2news1.google.com comp.lang.ada:15683 Date: 2007-05-09T10:21:20-07:00 List-Id: On May 9, 5:51 pm, "Dmitry A. Kazakov" wrote: > > 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. True, but is it possible to include dependency info within the object itself? > An interesting issue is cross-platform library units, I was playing with > this idea, but came to no conclusion. LLVM would be capable of this. > > 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. Why? Are you saying that it would be better to store libraries in IR rather than binary form? For a linux based compiler (for example) you still need to be able to link with binary libs, and I do think it's necessary to be able to build a shared lib with an Ada compiler - this would not be possible with IR, unless the whole OS worked in this way. > > 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... Like the old Ada library? I was actually thinking, if I couldn't embed the other information required by the compiler into the final object, then a separate "lib" containing only this informaton would be necessary. > > 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. RSX-11 is before my time, got any more info on this? Thanks, Luke.