mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-23 02:19:40 +01:00
The sources of the Free Pascal compiler, RTL, packages and utilities.
See https://www.freepascal.org/ for more info.
- indentation in ncgrtti.pas
- fewer ifdefs in rtti.inc
- InitTable/Terminator field as first field to avoid padding on targets that require proper alignment and have SizeOf(Pointer) > 4
Original message by Maciej Izak:
Breaking change for rtti layout for record rtti. Init table
is always accessible from regular rtti. Rtti table contains indirect
reference to init table, additionally init table contains nil-terminator (for
rtl purposes - the only way to determine kind of info : init or rtti). Pros:
* will be possible to create more Delphi compatible code for RTTI, finally end-user can access to *real* managed fields of records (some work on TypInfo.pp is still required but is not necessary).
* important step forward for management operators (anyway this commit is not directly related to management operators)
* much more optimal memory allocation/initialization/finalization for records created/destroyed by InitializeArray/FinalizeArray, for example:
type
TBar = record
f1,f2,f3,f4,f5,f6,f7,f8,f9: byte;
s: string;
end;
previously:
GetMem(PB, SizeOf(TBar));
InitializeArray(PB, TypeInfo(TBar), 1); // FPC_INITIALIZE was executed 10 times
now:
GetMem(PB, SizeOf(TBar));
InitializeArray(PB, TypeInfo(TBar), 1); // FPC_INITIALIZE is executed just once
+ test attached
git-svn-id: trunk@35125 -
|
||
|---|---|---|
| compiler | ||
| ide | ||
| installer | ||
| packages | ||
| rtl | ||
| tests | ||
| utils | ||
| .gitattributes | ||
| .gitignore | ||
| fpmake_add1.inc | ||
| fpmake_proc1.inc | ||
| fpmake.pp | ||
| Makefile | ||
| Makefile.fpc | ||