+ added test
Note: the test is added to webtbs although it's right now still failing, cause I'll remove the restriction for nested procedures since the compiler now supports them correctly. Due to the way we handle generics we don't have problems with them unlike Delphi.
git-svn-id: trunk@35147 -
* have tkInt64 and tkQWord entries also contain the OrdType field (basically the compiler can now use the same function to generate them only with different type kinds)
+ added test
git-svn-id: trunk@35135 -
* adjusted test trtti10.pp due to renamed RecInitTable field
Original commit message:
Public interface for init table for records in TypInfo:
* Rename RecInitTable to RecInitInfo (because it is special kind of PTypeInfo for init table of record). Has more sense in practical usage.
+ New structure TRecInitData (and related PRecInitData) to handle data for (init) type info for records (aka init table)
+ New structure TInitManagedField and pointer type PInitManagedField (for init table)
+ Special helper property RecInitData to get PRecInitData for tkRecord
+ test attached
git-svn-id: trunk@35134 -
- 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 -
* adjust unit to work without attributes
* adjust unit to work without unit list (TRttiContext.GetTypes is disabled due to this)
+ add ShortString support (due to an intermediary test I had done in $H-)
+ add unit test from Joost's Attribute branch
* adjust unit test accordingly (no attributes, no TRttiContext.GetTypes)
+ add ShortString tests
+ add testrunner for RTL-ObjPas tests using the new simpletestrunner
git-svn-id: trunk@35096 -
the scope penalty relative to the nearest symtable that contains one of
the applicable overloads, rather than relative to the nearest symtable
that simply contains a method with this name (based on patch by
Maciej Izak, mantis #25607)
git-svn-id: trunk@35089 -
* adjusted error message to reflect that we're not only dealing with generic classes
+ added test; note: it's added in webtbs, cause the test will loose its %FAIL attribute in the future
git-svn-id: trunk@35079 -
o ensure that the label's local "jumpbuf" variable gets moved to the
parentfpstruct soon enough
o don't generate global symbols for interprocedural labels: they're not
necessary if they are only used via setjmp/longjmp (all references are
local in that case), and if they are referenced via an assembler block
then we'll have to handle them by passing a blockaddress() expression
as parameter to that assembler block (which does not require a global
symbol, but which is not yet implemented)
git-svn-id: trunk@34946 -