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
svenbarth
15d0deff81
* fix SetToString/StringToSet for 8/16-bit platforms
...
git-svn-id: trunk@42244 -
2019-06-17 20:48:49 +00:00
svenbarth
89e454aca8
* rework/extend SetToString/StringToSet so that sets with a size > 4 can be converted as well (this is Delphi compatible)
...
+ added test
git-svn-id: trunk@42240 -
2019-06-16 21:36:25 +00:00
svenbarth
a076677336
* instead of a flags field generate a table with all Initialize operators of all fields (nested or not, parent class or not) for class types; objects and records don't use this (yet)
...
git-svn-id: trunk@39690 -
2018-08-29 19:21:35 +00:00
svenbarth
2e1327b6b2
* use pooled constant references for the parameter locations as more often than not they're equal between multiple methdos (e.g. the Self argument is always the same)
...
* using this the TypInfo unit can navigate interface methods and VMT method parameters much more quickly as the latter have a constant size now
git-svn-id: trunk@39686 -
2018-08-29 19:20:31 +00:00
svenbarth
029ec93df6
* use pooled constant references for the names of VMT methods in the RTTI
...
git-svn-id: trunk@39685 -
2018-08-29 19:20:27 +00:00
svenbarth
228d3252cc
* use pooled constant references for the parameter names of VMT methods in the RTTI
...
git-svn-id: trunk@39684 -
2018-08-29 19:20:24 +00:00
svenbarth
8536abce8a
* as the management operator feature is not platform specific using a specific define for it aside from a
...
version check is unnecessary, thus remove the FPC_HAS_MANAGEMENT_OPERATOR define and instead check for VER3_0
git-svn-id: trunk@39257 -
2018-06-20 19:00:24 +00:00
svenbarth
ac0322c323
+ add a flags field to the record init RTTI which declares whether
...
a) the current record contains a field with non-trivial initialization
b) and of the parents contains such a field (only relevant for objects and classes)
git-svn-id: trunk@39255 -
2018-06-20 19:00:17 +00:00
michael
16ba47be46
* Patch from Ondrej Pokorny to convert unit names to CamelCase (bug ID 33481)
...
git-svn-id: trunk@38616 -
2018-03-23 22:06:36 +00:00
michael
3f09294aab
* Functions to see whether a published property is readable or writeable
...
git-svn-id: trunk@37497 -
2017-10-20 19:41:56 +00:00
michael
a3bcefd78c
* Use pointer get/set methods
...
git-svn-id: trunk@37496 -
2017-10-20 19:17:11 +00:00
michael
3d3bbcfa9c
* Raise error if property cannot be written (Enhanced patch from Ondrej Pokorny, bug ID #32586 )
...
git-svn-id: trunk@37495 -
2017-10-20 18:44:35 +00:00
svenbarth
7e3ad42f33
+ add types for the VMT's message table (the names are Delphi compatible, even if TVmtMethodEntry has no Len field)
...
git-svn-id: trunk@37489 -
2017-10-18 19:38:03 +00:00
svenbarth
e6b39ebf15
+ add methods for easier enumeration of the fields in a class' field table
...
git-svn-id: trunk@37484 -
2017-10-17 21:07:32 +00:00