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,2def9aa85afa5d22 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-11-30 08:53:34 PST Newsgroups: comp.lang.ada Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.uchicago.edu!newsswitch.lcs.mit.edu!newsfeed.cwix.com!nntp.abs.net!news-out.visi.com!hermes.visi.com!uunet!ash.uu.net!xyzzy!nntp From: Jeffrey Carter Subject: Re: Joint Strike Fighter X-Nntp-Posting-Host: e246420.msc.az.boeing.com Content-Type: text/plain; charset=us-ascii Message-ID: <3C07B5D1.485E22C6@boeing.com> Sender: nntp@news.boeing.com (Boeing NNTP News Access) Content-Transfer-Encoding: 7bit Organization: The Boeing Company X-Accept-Language: en References: <3BDCE159.39F6D422@adaworks.com> <11bf7180.0110290311.4d8d6f04@posting.google.com> <3BDF9C6A.C25520C5@adaworks.com> <3BE023AB.8F235EF5@sparc01.ftw.rsc.raytheon.com> <9rp8mo$6d8$1@nh.pace.co.uk> <11bf7180.0111010338.6dbc1537@posting.google.com> <9u5q9g$md$1@nh.pace.co.uk> <9u863s$lo$1@nh.pace.co.uk> Mime-Version: 1.0 Date: Fri, 30 Nov 2001 16:37:37 GMT X-Mailer: Mozilla 4.73 [en]C-CCK-MCD Boeing Kit (WinNT; U) Xref: archiver1.google.com comp.lang.ada:17228 Date: 2001-11-30T16:37:37+00:00 List-Id: Marin David Condic wrote: > > I would think that a sensible implementation of Ada would look at the size > of the item being passed and decide on the most efficient means for the > given architecture. AFAIK, the in/out-ness of a parameter shouldn't force a > pass-by-value (the language lawyers can correct me here) but pretty > definitely an "in out" ought to be able to go by reference. (Again presuming > that the compiler makes an intelligent choice about how to pass the > parameter for maximum efficiency.) The ARM specifies that elementary types must be passed by value, regardless of size or mode, and tagged and limited types must be passed reference, regardless of size or mode. Other types are up to the compiler writer. So, for example, if your compiler supports 64-bit integer types on a platform with 32-bit registers (as GNAT does), they must be passed by value even though they don't fit in a single register and an address does. In this case pass by reference might be more "efficient" but is not allowed by the language. On the other hand, a small limited type must be passed by reference even though several of them might fit in one register. In this case pass by value might be more "efficient" but again is not allowed. -- Jeffrey Carter