[Lazarus] Extending TRect breaks Lazarus

Sven Barth pascaldragon at googlemail.com
Tue Nov 10 11:32:42 CET 2015


Am 10.11.2015 09:40 schrieb "J├╝rgen Hestermann" <juergen.hestermann at gmx.de>:
>
> Am 2015-11-09 um 14:26 schrieb Sven Barth:
>>
>>
>> > The docs already note that the compiler uses a temporary register
>> > for 'With'.
>> > http://www.freepascal.org/docs-html/ref/refsu58.html#x155-16500013.2.8
>> > Of course if there is no register left the compiler uses the stack.
>>
>> Please note that this is an implementation detail. The point a user
should care about is that the expression of the with is evaluated only once
(before the block of the with is entered). Everything else is up to the
compiler.
>> (I would prefer if it wouldn't be mentioned as is in the documentation)
>>
>>
> This information is very important IMO.
> The programmer should know which coding has which performance.

Which is solved by saying that the expression is only evaluated once. The
user doesn't need to know the detail that the value is kept in a temporary
register, because that statement by itself is utterly useless for the user,
as on load/store architectures like ARM you /always/ have values in
registers if they are worked with and the compiler will happily spill
around the contents if necessary.

Regards,
Sven
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20151110/ef014155/attachment-0003.html>


More information about the Lazarus mailing list