comp.lang.ada
 help / color / mirror / Atom feed
From: Adam Beneschan <adam@irvine.com>
Subject: Re: Will "renames" increase program size?
Date: Thu, 16 Jun 2011 10:42:01 -0700 (PDT)
Date: 2011-06-16T10:42:01-07:00	[thread overview]
Message-ID: <f6f13e97-5a4b-4ee9-903b-f6b7f539359a@e17g2000prj.googlegroups.com> (raw)
In-Reply-To: 1t5j5p8gurul3$.k4cq2qnsbbjb.dlg@40tude.net

On Jun 16, 9:33 am, "Dmitry A. Kazakov" <mail...@dmitry-kazakov.de>
wrote:
>
> > In this example, I believe that the renaming declaration cannot
> > legally cause Adjust to be called.
>
> I.e. the optimization is mandated for all tagged types in presence of
> return statement. Nevertheless Func creates a new object, which is then
> renamed.

It is not a mandated optimization, because if you follow the semantics
in the RM, the example involves no *assignment* to be optimized away.

I'm having difficulty responding to your points, because you seem to
be defining terms with regard to how you see the world and what
pictures go on in your head when you think about a program's
semantics.  So in this context, I can kind of understand why you'd
think of a "return object" as somehow belonging inside the function
and thus being a separate object from the object that holds the
function result from the caller's point of view.  And in this view,
sure, there would be a copy.  But all this is just based on how you
see the world, not on anything objective.  The only really objective
definitions we have here are the ones given by the RM.  And in the
world according to the RM, there is only one object (the return
object, which has multiple different "views" that are given different
names, but is still only one object and thus there's no copying going
on).  I can understand why you might look at things differently; but
it's hard for me to see how any conclusions that you draw, that are
based on your own meanings of the terms derived from your own pictures
of the world, are going to be of much use to anyone else.

                                -- Adam



  reply	other threads:[~2011-06-16 17:42 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-15  2:10 Will "renames" increase program size? Adrian Hoe
2011-06-15  5:37 ` Randy Brukardt
2011-06-15  9:11   ` AdaMagica
2011-06-15 11:26     ` Yannick Duchêne (Hibou57)
2011-06-15 11:24   ` Yannick Duchêne (Hibou57)
2011-06-15 13:15     ` Dmitry A. Kazakov
2011-06-16  6:59       ` AdaMagica
2011-06-16  8:59         ` Dmitry A. Kazakov
2011-06-16 10:18           ` AdaMagica
2011-06-16 12:15             ` Dmitry A. Kazakov
2011-06-16 23:22             ` Randy Brukardt
2011-06-16 15:40           ` Adam Beneschan
2011-06-16 16:33             ` Dmitry A. Kazakov
2011-06-16 17:42               ` Adam Beneschan [this message]
2011-06-16 18:53                 ` Dmitry A. Kazakov
2011-06-16 23:39                   ` Randy Brukardt
2011-06-17  6:53                     ` Dmitry A. Kazakov
2011-06-18  0:02                       ` Randy Brukardt
2011-06-18  7:54                         ` Dmitry A. Kazakov
2011-06-18  8:58                           ` Yannick Duchêne (Hibou57)
2011-06-18 10:05                             ` Dmitry A. Kazakov
2011-06-18 12:49                               ` Yannick Duchêne (Hibou57)
2011-06-18 22:44                           ` Randy Brukardt
2011-06-22  0:56                             ` Shark8
2011-06-15 22:21 ` anon
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox