comp.lang.ada
 help / color / mirror / Atom feed
From: "Yannick Duchêne (Hibou57)" <yannick_duchene@yahoo.fr>
Subject: Re: Child vs nested package : efficiency matter
Date: Tue, 01 Jun 2010 21:56:01 +0200
Date: 2010-06-01T21:56:01+02:00	[thread overview]
Message-ID: <op.vdm0bnfixmjfy8@garhos> (raw)
In-Reply-To: 46fd21ad-347d-48c2-945b-72e3d1fcef79@t34g2000prd.googlegroups.com

Le Tue, 01 Jun 2010 21:44:46 +0200, Adam Beneschan <adam@irvine.com> a  
écrit:
> It was just a theory.  My thinking was that if you have a global
> variable in a package *body* (and no subunits), a compiler can, in
> theory, draw some conclusions about how the variable is used, since
> there can be no uses of the variable except by subprograms in the
> package body, and perhaps perform some optimizations based on that.
> This doesn't work if the variable is in the spec (even in the private
> part), since the compiler won't know what child packages might be
> added later that have access to the variable.  Anyway, this was just a
> theory, not really based on any experience.
While this could be, theoretically, also possible to do global  
optimization (SmallEiffel and its successor SmartEiffel compiler did  
this), compiling a program as a whole.

I understand what you mean, it's obvious.

-- 
There is even better than a pragma Assert: a SPARK --# check.
--# check C and WhoKnowWhat and YouKnowWho;
--# assert Ada;
--  i.e. forget about previous premises which leads to conclusion
--  and start with new conclusion as premise.



  reply	other threads:[~2010-06-01 19:56 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-29 12:56 Child vs nested package : efficiency matter Yannick Duchêne (Hibou57)
2010-05-30  1:17 ` BrianG
2010-06-01 15:03 ` Adam Beneschan
2010-06-01 15:34   ` Yannick Duchêne (Hibou57)
2010-06-01 15:38     ` Adam Beneschan
2010-06-01 19:04     ` Simon Wright
2010-06-01 19:11       ` Yannick Duchêne (Hibou57)
2010-06-02 11:11         ` -gnatN breakage was: " Alex R. Mosteo
2010-06-02 14:39           ` Vadim Godunko
2010-06-02 16:45             ` Georg Bauhaus
2010-06-02 16:50               ` Yannick Duchêne (Hibou57)
2010-06-02 20:35               ` Vadim Godunko
2010-06-01 18:35 ` Adam Beneschan
2010-06-01 19:09   ` Yannick Duchêne (Hibou57)
2010-06-01 19:44     ` Adam Beneschan
2010-06-01 19:56       ` Yannick Duchêne (Hibou57) [this message]
2010-06-02  1:38     ` BrianG
replies disabled

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