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 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!news1.google.com!news.glorb.com!news.mv.net!nntp.TheWorld.com!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: Implementing an Ada compiler and libraries. Date: Wed, 09 May 2007 16:48:01 -0400 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: <1178721451.073700.10730@y80g2000hsf.googlegroups.com> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: pcls6.std.com 1178743682 32421 192.74.137.71 (9 May 2007 20:48:02 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Wed, 9 May 2007 20:48:02 +0000 (UTC) User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.3 (irix) Cancel-Lock: sha1:gcwICo4TPDFbyZhIiIU2ehUA9zU= Xref: g2news1.google.com comp.lang.ada:15688 Date: 2007-05-09T16:48:01-04:00 List-Id: Lucretia writes: > 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. Presumably by storing information (symbol tables and whatnot) in permanent disk files. If you do that, I think you should design it as a _pure_ optimization. That is, the system should behave exactly as if everything is compiled from source every time, except that it's faster. Don't mimic the Ada 83 compilers that had a notion of "compiling things into the library", where a source file sitting right there in the source directory is ignored, unless "compiled into...". If you do this, you need to design a permanent (on disk) representation that is small. I think it's possible, but it's not easy -- the "obvious" representation of symbol tables will be 10 times larger than the source code. If it's 10 times larger, then it defeats the purpose -- reading it in from disk will be slower than re-analyzing the original source code. You also suggested storing the info in the object files. Yes, that is possible, given a reasonable object file format that allows arbitrary information to be stored, in addition to the actual machine code. Building a complete Ada implementation is a daunting task (many person-years). You said you're doing a subset of Ada 2005, and I assume you're doing this "just for fun". Keep your subset small, or you will never finish. - Bob