comp.lang.ada
 help / color / mirror / Atom feed
From: Robert A Duff <bobduff@shell01.TheWorld.com>
Subject: Re: Eliminating copying in Gnat
Date: Tue, 21 Jan 2003 19:21:33 GMT
Date: 2003-01-21T19:21:33+00:00	[thread overview]
Message-ID: <wccbs2a8g1u.fsf@shell01.TheWorld.com> (raw)
In-Reply-To: b0jer0$ma4$1@a1-hrz.uni-duisburg.de

Georg Bauhaus <sb463ba@l1-hrz.uni-duisburg.de> writes:

> Victor Porton <porton@ex-code.com> wrote:
> :  But Adjust is called 3 times :-(
> 
> Are compilers allowed to optimize away an Adjust?

Yes.  There is an AI about exactly when it can.

> Might Adjust not have side effects?

Yes, but they better be the sort of side effects that are benign under
the allowed optimizations.  For example, if the type is doing reference
counting, the compiler can optimize away matched pairs of
increment/decrement.  But if Adjust prints "Hello, world.",
the programmer should not expect to see an exact number of
"Hello, world."'s printed on the screen.

- Bob



  reply	other threads:[~2003-01-21 19:21 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-20  4:12 Eliminating copying in Gnat Victor Porton
2003-01-20 14:57 ` Damien CARBONNE
2003-01-20 15:03   ` Lutz Donnerhacke
2003-01-20 18:34   ` Martin Krischik
2003-01-20 15:08 ` Stephen Leake
2003-01-20 21:27 ` Victor Porton
2003-01-21 12:35   ` Georg Bauhaus
2003-01-21 19:21     ` Robert A Duff [this message]
2003-01-21 14:52   ` Stephen Leake
2003-01-21 18:49   ` Martin Krischik
2003-01-21 13:10 ` Victor Porton
2003-01-21 18:40 ` Victor Porton
2003-01-21 20:54 ` Victor Porton
  -- strict thread matches above, loose matches on Subject: below --
2003-01-21 13:31 Grein, Christoph
2003-01-21 18:54 ` Randy Brukardt
2003-01-21 19:02 ` Georg Bauhaus
replies disabled

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