Commit Graph

277 Commits

Author SHA1 Message Date
Michaël Van Canneyt
8665e03886 * Add parameter to skip inherited fields 2024-03-11 13:52:35 +01:00
Michaël Van Canneyt
05f0ceeb26 * Atributes for class/record methods 2024-03-02 14:15:22 +01:00
Michaël Van Canneyt
4769ed948a * Add codeaddress to extended RTTI for static methods 2024-02-28 11:52:16 +01:00
Michaël Van Canneyt
06601d5e60 * Fix TExtendedVmtFieldEntry.GetTail 2024-02-26 15:20:15 +01:00
Michaël Van Canneyt
8527cb17f8 * Fix overflow in initialization of return value 2024-02-25 19:57:39 +01:00
Michaël Van Canneyt
bd2b0c8dca * Fix use of wrong memory size when getting extended property info 2024-02-25 19:57:39 +01:00
Michaël Van Canneyt
b7e8dd6268 * Add optional parameter to get methods of only current class 2024-02-18 21:36:05 +01:00
Michaël Van Canneyt
f6ce76b638 * Fix in overloads of GetFieldList 2024-02-18 10:44:20 +01:00
Michaël Van Canneyt
cde58d66fc * Make GetEnumName safer, check actual type. Allow passing an integer 2024-02-06 18:04:44 +01:00
Sven/Sarah Barth
21ffa221e6 * fix #40595: correctly access the list of parameters of the extended method table
+ added test
2024-01-15 23:14:38 +01:00
Sven/Sarah Barth
170c05592b * ensure that the legacy method table has the correct alignment on platforms that require it (e.g. SPARC64) 2024-01-07 18:09:51 +01:00
Michaël Van Canneyt
a224f8ded7 * Extended RTTI Type info routines and data structures 2024-01-02 07:09:23 +01:00
Sven/Sarah Barth
7eea850726 * TVmtFieldEntry.FieldOffset needs to be SizeUInt instead of PtrUInt, so that it works correctly on the various memory models of i8086 as well
+ added test
2024-01-02 07:09:19 +01:00
Sven/Sarah Barth
c74441323a + add descriptive comment regarding the TVmtField* types 2024-01-02 07:09:19 +01:00
Michaël Van Canneyt
a748d7279c * Re-add comment 2023-08-24 14:58:22 +02:00
Michaël Van Canneyt
6a07a508b8 * Simplify GetEnumNameCount (by Lagprogramming). Fixes issue #40411 2023-08-24 08:44:01 +02:00
Michael VAN CANNEYT
ccfa38c68e * Dotted RTL compiles 2023-07-27 19:04:03 +02:00
Michael VAN CANNEYT
6f4ade6abe * Char -> AnsiChar 2023-07-14 17:26:10 +02:00
Michaël Van Canneyt
90f902c7d4 * Invoke helper definition, allow calling it 2023-07-13 07:32:21 +00:00
Michaël Van Canneyt
70282826ad * Parent class for hidden TVirtualInterface thunking class 2023-07-11 08:36:57 +00:00
Michaël Van Canneyt
4d66ac9118 * Add PProcedureSignature 2023-06-05 11:43:07 +02:00
Sven/Sarah Barth
5a0ace6d45 * replace Length(<array>) - 1 with High(<array>) which leads to slightly shorter/better code (reported by lagprogramming on the forum) 2023-05-26 22:19:32 +02:00
Sven/Sarah Barth
d40a2dbb12 + add generic utility function ConstParamIsRef<> to determine whether a specific type is passed by-value or by-reference as a const parameter 2023-03-06 23:24:36 +01:00
Ondrej Pokorny
d1f999100b Add SetToArray and ArrayToSet functions for more general RTTI Set handling 2022-12-18 13:32:15 +00:00
yury
9a01bcf3dc * Changed Integer to Longint in definitions of RTTI structures. It fixes typinfo for 16-bit CPUs.
git-svn-id: trunk@46503 -
2020-08-20 10:31:56 +00:00
svenbarth
a00be912aa * fix regression introduced with r42240: packed sets for the Integer based variants of SetToString/StringToSet need to be shifted on Big Endian systems
git-svn-id: trunk@43048 -
2019-09-21 14:36:19 +00:00
svenbarth
7e1607e095 * correct alignment for the property table
git-svn-id: trunk@42808 -
2019-08-24 23:08:36 +00:00
svenbarth
2dc771b7ba * TClassData also needs alignment dummies
git-svn-id: trunk@42807 -
2019-08-24 23:08:33 +00:00
svenbarth
2002650a23 * small corrections (grammar, casing, typo) for the comment for TCallConv
git-svn-id: trunk@42802 -
2019-08-24 23:08:17 +00:00
svenbarth
707e05d131 * check for CPUM68k instead of M68K; the latter should only be defined when building the compiler, so I wonder how that ever worked...
git-svn-id: trunk@42765 -
2019-08-22 20:45:48 +00:00
florian
1a67ffdd22 * fix alignment of ParamList
* fix test for architectures using aligned rtti

git-svn-id: trunk@42516 -
2019-07-28 12:43:15 +00:00
florian
23585ded15 * fix access to ParamFlags of the tkMethod branch of type data for CPUs requiring proper alignment
git-svn-id: trunk@42511 -
2019-07-28 11:55:19 +00:00
florian
73acb4d1c1 * fixes TInterfaceRawData to match TTypeData
git-svn-id: trunk@42486 -
2019-07-23 19:59:34 +00:00
nickysn
a3a39e1640 * i8086 compilation fix after changeset 42390
git-svn-id: trunk@42485 -
2019-07-23 11:57:20 +00:00
florian
217ae6e4bb * more fixes to rtti after attribute branch merging
git-svn-id: trunk@42476 -
2019-07-21 08:28:29 +00:00
svenbarth
71fa4d1fe2 * the RTTI of an attribute not only consists of the creation function, but also of the attribute's type, a pointer to the constructor and a data blob containing the constant parameters
+ added test

git-svn-id: trunk@42390 -
2019-07-12 22:07:05 +00:00
svenbarth
8cd1f1973b - remove unneeded local variable
git-svn-id: trunk@42386 -
2019-07-12 22:06:48 +00:00
svenbarth
affa9f9d9c * to be on the safe side: don't include AttributeTable fields when cycling
git-svn-id: trunk@42385 -
2019-07-12 22:06:44 +00:00
svenbarth
3ad24c9db8 * as attributes can be part of any type they are best suited in a common part of TTypeData
git-svn-id: trunk@42375 -
2019-07-12 22:06:09 +00:00
svenbarth
de15025a47 * streamline retrieval of attributes (both in TypInfo and RTTI units)
git-svn-id: trunk@42373 -
2019-07-12 22:06:02 +00:00
svenbarth
e060a43d70 * rename TAttributeData to the more appropriate TAttributeTable
git-svn-id: trunk@42371 -
2019-07-12 22:05:55 +00:00
svenbarth
c17dafc2f9 * fix TClassData by including the AttributeTable at the right location
git-svn-id: trunk@42370 -
2019-07-12 22:05:51 +00:00
svenbarth
e296b26e9e - remove unit info and related code again as that will be handled similar, but differently with dynamic packages
git-svn-id: trunk@42369 -
2019-07-12 22:05:47 +00:00
svenbarth
ee940c8270 * always write a class' reference to the attribute table, even if the unit does not have attributes
git-svn-id: trunk@42368 -
2019-07-12 22:05:42 +00:00
svenbarth
788d976f3a * use a Word instead of a Byte for the attribute index (after all the compiler writes a Word to the count field)
git-svn-id: trunk@42367 -
2019-07-12 22:05:39 +00:00
svenbarth
5153a288dc * it's more correct for GetPropAttribute to return a TCustomAttribute instead of a TObject
git-svn-id: trunk@42366 -
2019-07-12 22:05:33 +00:00
svenbarth
d137e06ade * instead of embedding the attributes inside the class' and property's type data only store a reference to a table of attributes
git-svn-id: trunk@42365 -
2019-07-12 22:05:29 +00:00
svenbarth
84848df18d Reintegration of Custom Attributes branch by Joost van der Sluis with patches reworked by Svetozar Belic [patch 3/3]
Added FPC_REQUIRES_PROPER_ALIGNMENT to TUnitInfo definition. Added FPC_HAS_EXTENDED_RTTI define.

git-svn-id: trunk@42358 -
2019-07-12 22:04:56 +00:00
svenbarth
b2932393df Reintegration of Custom Attributes branch by Joost van der Sluis with patches reworked by Svetozar Belic [patch 1/3]
Implemented attributes for class types and properties (based on work by Joost van der Sluis). Added TCustomAttribute - a base class for attributes. Added TUnitInfo record to RTTI. It contains the unit name and unit options (for now only a flag which specifies if the unit contains attributes). Added several tests for attributes.

git-svn-id: trunk@42356 -
2019-07-12 22:04:48 +00:00
svenbarth
cc5549f3e7 * change Value argument of SetToString and result of of StringToSet from Integer to LongInt so that small sets are handled on 8/16-bit platforms as they are on 32- and 64-bit
git-svn-id: trunk@42245 -
2019-06-17 20:48:58 +00:00