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.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,79bbf7e359159d0d X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-04-11 07:42:06 PST Path: supernews.google.com!sn-xit-03!supernews.com!logbridge.uoregon.edu!titan03.ksc.nasa.gov!niven.ksc.nasa.gov!usenet From: "Samuel T. Harris" Newsgroups: comp.lang.ada Subject: Re: newbie can't get exceptions to work! Date: Wed, 11 Apr 2001 09:34:22 -0500 Organization: Raytheon Aerospace Engineering Services Message-ID: <3AD46B6E.6A8592A@gsde.hou.us.ray.com> References: <3ACDB29E.45B91316@earthlink.net> <9ao1if$cq9$1@taliesin.netcom.net.uk> <3ACFC902.115624A1@mindspring.com> <3AD2AF50.6B5DD470@mida.se> <3AD33480.2A5E9CD9@home.com> <3AD44621.DEE2369F@mida.se> Reply-To: samuel_t_harris@raytheon.com NNTP-Posting-Host: sstf-fw.jsc.nasa.gov Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 4.7 [en] (X11; U; IRIX64 6.2 IP19) X-Accept-Language: en Xref: supernews.google.com comp.lang.ada:6763 Date: 2001-04-11T09:34:22-05:00 List-Id: Mats Karlssohn wrote: > > Mark Biggar wrote: > > > > Ted Dennison wrote: > > > (Is pragma inline allowed for a dispatching call?) > > > > Sure, but like any progam inline there is nothing in the LRM that > > requires that the compiler actually do anything with it. Remember, > > a compiler is free to totaly ingore all pragma inlines. I imagine > > that most (if not all) Ada compilers don't do anything special and > > just ignore pragma inline on dymnamic dispatching calls. > > Without thinking it through, shouldn't it be quite easy just to > replace the jump-to-subroutine in the (equivalent of a) case statement > with the inlined code ? Maybe not, I guess it depends on how the > lookup is done. > Since a dynamic dispatching call involves a access to a class-wide type and the caller class does not have knowledge at compile time of ALL the tagged types under the class-wide type, the compiler cannot inline while compiling the call. It would have to insert the appropriate inlining during some binding stage just before linking when all the compilation artifacts are available. Many compilers require the body of an inlined subprogram to be _already_ compiled in order for inlining to work. Such compilers will definitely not suppor the notion of inline dispatching calls. -- Samuel T. Harris, Principal Engineer Raytheon, Aerospace Engineering Services "If you can make it, We can fake it!"