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!news4.google.com!feeder.news-service.com!border-3.ams.xsnews.nl!feed.xsnews.nl!border-1.ams.xsnews.nl!193.141.40.65.MISMATCH!npeer.de.kpn-eurorings.net!npeer-ng0.de.kpn-eurorings.net!nntp.ilk.net!not-for-mail From: Markus Schoepflin Newsgroups: comp.lang.ada Subject: Re: Sharing generic bodies across instantiations. Date: Wed, 28 Jul 2010 10:42:32 +0200 Organization: Customer of ILK Internet GmbH, Karlsruhe, Germany Message-ID: References: <4c4e2d69$0$2378$4d3efbfe@news.sover.net> NNTP-Posting-Host: csdc.comsoft.de Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: nntp.ilk.net 1280306553 18212 212.86.205.70 (28 Jul 2010 08:42:33 GMT) X-Complaints-To: usenet@ilk.net NNTP-Posting-Date: Wed, 28 Jul 2010 08:42:33 +0000 (UTC) User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.1.11) Gecko/20100711 Thunderbird/3.0.6 In-Reply-To: Xref: g2news1.google.com comp.lang.ada:12623 Date: 2010-07-28T10:42:32+02:00 List-Id: Am 28.07.2010 02:55, schrieb Keith Thompson: [...] > 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. And Ada compiler is certainly not required to do anything but syntax checking for pragma optimize, but at least they had code sharing in mind when specifying the pragma. From the 2005 AARM: 27.a Implementation defined: Effect of pragma Optimize. 27.b Discussion: For example, a compiler might use Time vs. Space to control whether generic instantiations are implemented with a macro-expansion model, versus a shared-generic-body model.