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=0.7 required=5.0 tests=BAYES_00,MSGID_RANDY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,75a8a3664688f227 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-01-10 20:32:04 PST Path: supernews.google.com!sn-xit-03!supernews.com!freenix!oleane.net!oleane!newsfeed.mathworks.com!news.maxwell.syr.edu!nntp2.deja.com!nnrp1.deja.com!not-for-mail From: Robert Dewar Newsgroups: comp.lang.ada Subject: Re: Parameter Modes, In In Out and Out Date: Thu, 11 Jan 2001 04:23:12 GMT Organization: Deja.com Message-ID: <93jcfb$73l$1@nnrp1.deja.com> References: <86itno316m.fsf@acm.org> <93ilsb$jdf$1@nnrp1.deja.com> <3A5CF57A.225BC5B5@averstar.com> NNTP-Posting-Host: 205.232.38.14 X-Article-Creation-Date: Thu Jan 11 04:23:12 2001 GMT X-Http-User-Agent: Mozilla/4.61 [en] (OS/2; U) X-Http-Proxy: 1.0 x55.deja.com:80 (Squid/1.1.22) for client 205.232.38.14 X-MyDeja-Info: XMYDJUIDrobert_dewar Xref: supernews.google.com comp.lang.ada:3897 Date: 2001-01-11T04:23:12+00:00 List-Id: In article <3A5CF57A.225BC5B5@averstar.com>, Tucker Taft wrote: > Unless you can prove that passing them by reference would be > equivalent, of course. Well when we say that something must be passed by copy, we are not making statements about generated code, but about semantics. After all the compiler can do anything it likes if it makes no difference. For example, if it knows that the result of a call to the cosine function is not needed, then the compiler can call the sine function instead, but that's not really relevant in talking about semantics. E.g., for [in] out parameters, we generally pass an address > of something. Usually that something is a temp which is initialized > by copy from the actual parameter. However, if we can prove that > it is safe to pass the address of the actual parameter itself > (which involves checking for the presence of things like exception > handlers, local task units, aliasing, etc.) then we can do so, > and thereby avoid the space and copy [in/]out for the temp. > > -- > -Tucker Taft stt@avercom.net http://www.averstar.com/~stt/ > Chief Technology Officer, AverCom, Inc. (A Titan Company) Burlington, MA USA > (AverCom was formed 1/1/01 from the Commercial Division of AverStar) > (http://www.averstar.com/services/ebusiness_applications.html) > Sent via Deja.com http://www.deja.com/