[fpc-devel] Class field reordering

Martin Schreiber mse00000 at gmail.com
Sat Jul 14 07:50:58 CEST 2012


On Saturday 14 July 2012 01:44:39 Jonas Maebe wrote:
> Hi,
>
> I've implemented an optimization that reorders the instance fields of
> Delphi-style classes (and only of Delphi-style classes) to minimise
> memory gaps caused by alignment differences and odd sizes. The effect
> is the same as when you would change the order of the fields in the
> source code to achieve this effect.
>
I sometimes need "cracker" classes in MSEide and MSEgui to fix bugs and make 
extensinsions for FCL classes in order to access private fields (examples 
TDataset, TParam, TField, TFiler, TReader, TWriter, TComponent).
Is it guaranteed that the local definitions have the same layout as the 
definition in the FCL unit?

Martin



More information about the fpc-devel mailing list