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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,daf1e35a4e978e9d X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-07-21 01:45:22 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!feed.cgocable.net!border1.nntp.aus1.giganews.com!nntp.giganews.com!nntp3.aus1.giganews.com!bin3.nnrp.aus1.giganews.com.POSTED!news.clear.net.nz From: Craig Carey Newsgroups: comp.lang.ada Subject: Re: have to use unrestricted access but just what about access Message-ID: References: <0x8Q8.6779$ZP1.1263481@news11-gui.server.ntli.net> <5ee5b646.0206210345.2d58d8e0@posting.google.com> X-Newsreader: Forte Agent 1.9/32.560 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Organization: Customer of Mercury Telecommunications Ltd Cache-Post-Path: drone3-svc-skyt.qsi.net.nz!unknown@tnt1-58.quicksilver.net.nz X-Cache: nntpcache 2.4.0b5 (see http://www.nntpcache.org/) X-Original-NNTP-Posting-Host: drone3-svc-skyt.qsi.net.nz X-Original-Trace: 21 Jul 2002 20:44:55 +1200, drone3-svc-skyt.qsi.net.nz NNTP-Posting-Date: Sun, 21 Jul 2002 03:45:06 CDT X-Trace: sv3-fiQXfRPHKcrAOCeOjSWHvq3dPirzpGW13YyEmCS02UQes9DJaCGVYXedi5aOjiS71mZmaIBuzNgzzez!4I61Gpt0X3902Id9W2LqWSxM5f573pVSOe78Uk3OuEIaaeWD1/PBZCgBZZvzoqykVUhLkHpQfori!29s1CA== X-Complaints-To: abuse@GigaNews.Com X-DMCA-Notifications: http://www.giganews.com/info/dmca.html X-Abuse-Info: Please be sure to forward a copy of ALL headers X-Abuse-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.1 Date: Sun, 21 Jul 2002 08:45:06 GMT Xref: archiver1.google.com comp.lang.ada:27280 Date: 2002-07-21T08:45:06+00:00 List-Id: On Sat, 20 Jul 2002 17:47:07 GMT, Robert A Duff wrote: ... >No. If you look up the definition of "aliased", I don't think you'll >find any mention of "by reference". ... >But the other way around is not true: passing a parameter by reference >does not imply that it's aliased. > Here is text from the AARM saying that internal formal parameter is an aliased view of the external actual object if the type is tagged. --------------- >AARM 3.10 Access Types ... >9 {aliased} ... In addition, the dereference of an access-to- >object value denotes an aliased view, as does a view conversion >(see 4.6) of an aliased view. Finally, the current instance of a >limited type, and a formal parameter or generic formal object of >a tagged type are defined to be aliased. [Aliased views are the >ones that can be designated by an access value.] ... ... >9.g A formal parameter of a tagged type is defined to be >aliased so that a (tagged) parameter X may be passed to an access >parameter P by using P => X'Access. Access parameters are most >important for tagged types because of dispatching-on-access- >parameters (see 3.9.2). By restricting this to formal parameters, >we minimize problems associated with allowing components that are >not declared aliased to be pointed-to from within the same >record. http://www.adaic.org/standards/95aarm/html/AA-3-10.html --------------- I am not clear on this here: if there is a java-like background garbage collector, then applying 'Access on a not-aliased but by-reference not-tagged and not limited but Volatile internal formal record object might sometimes fail to give the address of external actual object that is safe to use...?. (Section C.6 of the AARM does not contain the word "aliased"). Anyway, when the type is "tagged", 3.10(9) that the parameter passing is by the aliased mode (the actual external isn't cached or shifting, etc.). >>... A type can be made to be by-reference using "pragma Voltile". > >But you wouldn't want to do that, because it might damage efficiency. > My "pragma Volatile"s in the example can be deleted: the record was tagged. Thanks. >> Craig Carey, >> >> http://www.ijs.co.nz/ada_95 (some Ada 95 mailing lists)