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.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,e0e1d3b3f7c994b8 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!postnews.google.com!m34g2000hsc.googlegroups.com!not-for-mail From: Maciej Sobczak Newsgroups: comp.lang.ada Subject: Re: Robert Dewar's great article about the Strengths of Ada over other langauges in multiprocessing! Date: Thu, 13 Mar 2008 01:41:26 -0700 (PDT) Organization: http://groups.google.com Message-ID: <02f7cc69-043f-4366-8510-abcba258978c@m34g2000hsc.googlegroups.com> References: <13t4b2kkjem20f3@corp.supernews.com> <89af8399-94fb-42b3-909d-edf3c98d32e5@n75g2000hsh.googlegroups.com> <47D39DC8.20002@obry.net> <114f711c-9cf8-4fdb-8f11-77667afb8719@c33g2000hsd.googlegroups.com> <33557da4-e4ba-4c75-9a55-4b7eb5fdad3b@i12g2000prf.googlegroups.com> <87iqzr26vc.fsf@willow.rfc1149.net> NNTP-Posting-Host: 137.138.182.223 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: posting.google.com 1205397686 32025 127.0.0.1 (13 Mar 2008 08:41:26 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 13 Mar 2008 08:41:26 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: m34g2000hsc.googlegroups.com; posting-host=137.138.182.223; posting-account=bMuEOQoAAACUUr_ghL3RBIi5neBZ5w_S User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.12) Gecko/20080211 Red Hat/1.5.0.12-0.10.el4 Firefox/1.5.0.12 pango-text,gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:20334 Date: 2008-03-13T01:41:26-07:00 List-Id: On 12 Mar, 18:24, Samuel Tardieu wrote: > Maciej> In the most extreme case (global linker optimization), all > Maciej> calls can be resolved statically. > > Not even. Consider a base class B with two child classes D1 and > D2 with their own virtual destructors. Pseudo-code: > > B* o; > if (user_provided_integer_from_keyboard() == 0) > B = new D1; > else > B = new D2; > do_something_with (B); > delete B; > > You cannot resolve "delete" statically Of course I can. Note that the above is equivalent to: B* o; if (user_provided_integer_from_keyboard() == 0) { B = new D1; do_something_with (B); delete B; } else { B = new D2; do_something_with (B); delete B; } There is no further obstacle in resolving the call statically. -- Maciej Sobczak * www.msobczak.com * www.inspirel.com