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: a07f3367d7,9506bdc34331969a X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.google.com!proxad.net!feeder1-2.proxad.net!fdn.fr!club-internet.fr!feedme-small.clubint.net!nuzba.szn.dk!news.jacob-sparre.dk!pnx.dk!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: put of access type Date: Fri, 21 Aug 2009 16:43:05 -0500 Organization: Jacob Sparre Andersen Message-ID: References: <8sho8596j3qnja38id9ipejk0opkcn5b5m@4ax.com> <4a8cea9c$1@news.post.ch> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: munin.nbi.dk 1250891056 18571 69.95.181.76 (21 Aug 2009 21:44:16 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Fri, 21 Aug 2009 21:44:16 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5512 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 Xref: g2news2.google.com comp.lang.ada:7952 Date: 2009-08-21T16:43:05-05:00 List-Id: "Robert A Duff" wrote in message news:wccr5v5xlza.fsf@shell01.TheWorld.com... ... > I think that still works fine in Ada 95/2005 for pool-specific access > types (which is the only kind that existed in Ada 83). The only > relevant language change is that you can convert from pool-specific to > general. So you have to be able to take your offset, and produce a > "full" address, or whatever a general access type is represented as. As > far as I can see, the addition of user-defined storage pools to the > language is irrelevant here. I don't see how this could work. There is no call-back to the storage pool when converting from pool-specific to general access, so how could the pool make the conversion? The compiler can't make the conversion, it doesn't know anything about the implementation of the pool for an access type. Even if the compiler could know about the need for this magic for some specific type, it would have to be prepared to generate code to convert to address in many places other than a straight conversion (renaming .all or passing .all as a parameter, for instance). The code to make that conversion probably would be more expensive than any savings gained elsewhere. And such a model would completely prevent any implementation strategies based on all access types having a well-defined storage pool. (Humm, I suppose it could be done with an extension of Root_Storage_Pool, but that would make the code for dereferencing prohibititively expensive, since you'd have to do a tag test before you could dispatch.) So I guess I was a bit strong at the start here: it could be made to work, but only by abandoning all reasonable implementation strategies and accepting substantial overhead. Which doesn't make sense to me. Randy.