On Fri, Apr 10, 2009 at 02:22:06PM +0400, dmitry boyarintsev wrote:
> Can compiler detect, if initialized procedure variable is not used and
> smartlink it off?
> In the following example:
> there's a global procedure variable. it's initialized by unit2, that
> is used by program.
> but even if it'
Op woensdag 08-04-2009 om 17:14 uur [tijdzone +0100], schreef Martin
Friebe:
> Alexey S. Smirnov wrote:
> > Vincent Snijders ?:
> >> Can somebody explain to me why smartlinking works better when a unit
> >> is in the implementation section than when it is in the interface
> >> section? I though
Can compiler detect, if initialized procedure variable is not used and
smartlink it off?
In the following example:
there's a global procedure variable. it's initialized by unit2, that
is used by program.
but even if it's initialized, the procedure itself (someProc) is never called.
So, is it possib
On Thu, Apr 09, 2009 at 11:35:44AM +0200, svaa wrote:
> Vincent Snijders escribi??:
> > No, the initialization section of the graphics unit and its dependencies
> > is used. The lesson is: you cannot smart link away initialization (and
> > finalization) sections of a unit.
>
> Why not?
>
> Is t
svaa schreef:
> Vincent Snijders escribió:
>> No, the initialization section of the graphics unit and its dependencies
>> is used. The lesson is: you cannot smart link away initialization (and
>> finalization) sections of a unit.
>> > Why not?
>
> Is there are a design reason for such behavior?
Vincent Snijders escribió:
> No, the initialization section of the graphics unit and its dependencies
> is used. The lesson is: you cannot smart link away initialization (and
> finalization) sections of a unit.
>
> Vincent
> ___
> Lazarus mailing list
>
Alexey S. Smirnov wrote:
> So. Ones more - to reduce Lazarus-aware projects code size we shall
> first check and cleanup "Uses" sections to remove unused units, and next
> - test Initialization and Finalization sections. Do we really need them?
> For the Dephi times I remember that those section
Vincent Snijders пишет:
No, the initialization section of the graphics unit and its dependencies
is used. The lesson is: you cannot smart link away initialization (and
finalization) sections of a unit.
Vincent
But result is very understandable - if we have some unused units (with
Ini
Alexey S. Smirnov schreef:
> Florian Klaempfl пишет:
>> This could be simply the influence of a different memory layout of the exe.
>>
> It seams that I was wrong. So. Lets do next small test.
> The main program is:
> |program small_test;
> {$mode objfpc}{$H+}
>
> uses
> Unit1;
> begin
> Prin
Florian Klaempfl пишет:
This could be simply the influence of a different memory layout of the exe.
It seams that I was wrong. So. Lets do next small test.
The main program is:
program small_test;
{$mode objfpc}{$H+}
uses
Unit1;
begin
Print_Hello_Word;
end.
Uni1.pas is:
Unit unit1;
Florian Klaempfl пишет:
Alexey S. Smirnov schrieb:
This could be simply the influence of a different memory layout of the exe.
Yes, potentially...
But, please - explain - why compiler can simply detect and remove
unused Unit from Implementation section and NEWER do that for Inter
Alexey S. Smirnov schrieb:
> Martin Friebe пишет:
>> Is this documented somewhere? I can't follow the logic anyway, the scope
>> how much my code uses of another unit can not be predicted, simply by
>> where I include the other code?
>>
>> Actually, I do believe I have seen examples where code fo
Martin Friebe пишет:
Is this documented somewhere? I can't follow the logic anyway, the scope
how much my code uses of another unit can not be predicted, simply by
where I include the other code?
Actually, I do believe I have seen examples where code form units used
in the interface was
Alexey S. Smirnov wrote:
> Vincent Snijders ?:
>> Can somebody explain to me why smartlinking works better when a unit
>> is in the implementation section than when it is in the interface
>> section? I thought for smartlinking it doesn't make a difference, the
>> unit is used anyway.
>>
> Th
14 matches
Mail list logo