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,e93f73587e2bc1c3 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!proxad.net!feeder1-2.proxad.net!newsfeed.straub-nv.de!open-news-network.org!eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.ada Subject: Re: Sharing generic bodies across instantiations. Date: Tue, 27 Jul 2010 17:55:18 -0700 Organization: None to speak of Message-ID: References: <4c4e2d69$0$2378$4d3efbfe@news.sover.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Date: Wed, 28 Jul 2010 00:57:19 +0000 (UTC) Injection-Info: mx01.eternal-september.org; posting-host="9nFTuw1iclElqUG5+//YDQ"; logging-data="26859"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/tkI5NYazoRNXUMHxyryph" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:aUM0kafqiyCTnVwO38A3R/WCZCQ= sha1:lJIPJkUDxb+3otF91Nx1Whck4Jw= Xref: g2news1.google.com comp.lang.ada:12621 Date: 2010-07-27T17:55:18-07:00 List-Id: anon@att.net writes: [...] > The Replication versus the Sharing of Generic code was initial based on the > Ada Optimize pragma statement. That is, when the users define the option > of "Time" the Generic code would be replicated, but the "Space" option > would cause the compiler to share the code body. Not using the pragma > statement or the Ada 95 "off" option allowed the designer to set an > implementation default. I don't believe the definition of pragma Optimize was ever that specific; as far as I know, it was always intended merely as a vague hint. Here's the description from the Ada 83 reference manual: OPTIMIZE Takes one of the identifiers TIME or SPACE as the single argument. This pragma is only allowed within a declarative part and it applies to the block or body enclosing the declarative part. It specifies whether time or space is the primary optimization criterion. Using it to control generic code sharing would certainly be reasonable, but it's not required. -- Keith Thompson (The_Other_Keith) kst-u@mib.org Nokia "We must do something. This is something. Therefore, we must do this." -- Antony Jay and Jonathan Lynn, "Yes Minister"