Commit Graph

253 Commits

Author SHA1 Message Date
svenbarth
fd1047c715 * use the correct alignment for the field following the unit name of an interface (raw or not doesn't matter)
git-svn-id: trunk@35410 -
2017-02-10 16:02:23 +00:00
svenbarth
060cb62f2a * correctly handle alignment for TParameterLocations
git-svn-id: trunk@35355 -
2017-01-28 16:02:09 +00:00
svenbarth
f1a5fbc0df * rename TIntfMethodEntry.ReturnLoc to ResultLocs for consistency with both ResultType and TVmtMethodParam.ParaLocs
git-svn-id: trunk@35347 -
2017-01-28 13:28:03 +00:00
svenbarth
26135d605f + implement interface RTTI inspired by the changes from Steve Hildebrandt, yet not exactly the same. Like his implementation this one isn't Delphi compatible either.
+ added test

git-svn-id: trunk@35341 -
2017-01-27 17:00:15 +00:00
svenbarth
03715bd9a8 + add data records TInterfaceData for COM and TInterfaceRawData for raw interfaces that allow for easier access to data that's only accessible by using pointers (and keeping track of alignment) without further polluting TTypeData
git-svn-id: trunk@35339 -
2017-01-27 16:53:47 +00:00
svenbarth
c6233697be + add utility properties to TPropData to access a specific TPropInfo or the end of the known data of all properties
git-svn-id: trunk@35338 -
2017-01-27 16:49:47 +00:00
svenbarth
bf2891938f + add utility properties to TPropInfo to easily access the next TPropInfo in a list of prop infos (TPropInfo.Next) or the direct, unpadded end of the known information (TPropInfo.Tail)
git-svn-id: trunk@35337 -
2017-01-27 16:47:45 +00:00
svenbarth
3b1ae57844 * allow for AlignTypeData() to be inlined
git-svn-id: trunk@35322 -
2017-01-20 15:39:33 +00:00
svenbarth
8e510da317 * adjust AlignTypeData to take a Pointer as argument as it also needs to be used for e.g. subrecords inside TTypeData (e.g. the property table of interfaces)
git-svn-id: trunk@35321 -
2017-01-20 15:38:51 +00:00
svenbarth
e827c28722 + not only add pfResult to the compiler, but also indeed to TParamFlag
git-svn-id: trunk@35291 -
2017-01-13 16:40:09 +00:00
svenbarth
ecb878a7a7 * move PParameterLocation before TParameterLocation for consistency with all other pointer declarations in the unit
git-svn-id: trunk@35285 -
2017-01-13 16:13:18 +00:00
svenbarth
fe28403330 + two more pointer types (PPropData for TPropData and PParameterLocations for TParameterLocations)
git-svn-id: trunk@35284 -
2017-01-13 16:12:26 +00:00
svenbarth
990b0e1657 * fix TParameterLocations.GetLocation()
git-svn-id: trunk@35283 -
2017-01-13 16:11:10 +00:00
svenbarth
0dbc123557 * ensure that TRegisterType and TSubRegister have a size of 1 by moving them at the correct location
git-svn-id: trunk@35282 -
2017-01-13 16:10:17 +00:00
svenbarth
5275c36393 + extend TParamFlags by values for hidden parameters in general and especially the hidden high, self and vmt parameters (this is necessary so a manager approach for Invoke() can be used with as few knowledge about the involved calling conventions as possible)
Note: with this TParamFlags exceeds the size of a Byte

git-svn-id: trunk@35267 -
2017-01-08 16:08:35 +00:00
svenbarth
bd8a7be17e * better implementation of TProcedureParam.GetFlags that correctly handles a TParamFlags with a size > 1 even on big endian
git-svn-id: trunk@35262 -
2017-01-08 12:41:06 +00:00
svenbarth
417f1cd49d + initial implementation of the RTTI for parameter locations (not *yet* used by anything)
The parameter manager converts from the internal compiler representation of
a parameter's location to an RTTI representation. As the general implementation
more or less directly uses the compiler structures for this a platform specific
parameter manager may override this functionality in case some parameter
information changed in a non-backwards compatible way.
The RTTI parameter location has a layout that allows for an easy enumeration
as the size is fixed for all locations. Additionally there are properties that
allow for easy access to the information stored in them.

git-svn-id: trunk@35250 -
2017-01-06 22:21:37 +00:00
florian
0b82f71e8d * take care of the fact that there are 32 bit abis (e.g. ARMHF) which align qword on 8 byte boundaries, resolves issue #31132
git-svn-id: trunk@35218 -
2016-12-30 15:32:56 +00:00
svenbarth
4717d78ac3 * as restructuring TTypeData to correctly layout tkBool for 64-bit Booleans is basically impossible at least add a comment for tkBool to the tkInt64 and tkQWord branches
git-svn-id: trunk@35188 -
2016-12-23 16:26:16 +00:00
svenbarth
73ed1a9bf1 * fix for Mantis #31140: applied patch by Maciej Izak; this way it's clear what purpose ManagedFldCount has in FPC compared to Delphi
Commit message of patch:

+ New field TotalFieldCount for TTypeData
* Mark ManagedFldCount as deprecated
* Adjusted test trtti12.pp

git-svn-id: trunk@35180 -
2016-12-23 15:32:44 +00:00
svenbarth
2acf542737 * extend TParamFlag by pfConstRef which is set for constref parameters
* extend test trtti9.pp accordingly

git-svn-id: trunk@35175 -
2016-12-20 21:37:07 +00:00
svenbarth
1553aa5639 * declare the first field of TProcedureParam as TParamFlags to avoid potential problems if more than 8 entries should be used (especially if some day the hidden Self and High parameters should be written)
* rename first field of TProcedureParam to ParamFlags and introduce a property Flags for backwards and Delphi compatibility

git-svn-id: trunk@35174 -
2016-12-20 21:13:04 +00:00
svenbarth
a9d14fe30b * extend TOrdType by entries for 64-bit values
* 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 -
2016-12-16 14:22:04 +00:00
svenbarth
460f309035 * fix for Mantis #31123, applied patch by Maciej Izak
* 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 -
2016-12-16 13:43:12 +00:00
svenbarth
7089677a22 * change RecInitTable into a direct reference to avoid an unnecessary indirection as both the full and init RTTI of a record always reside inside the same unit
git-svn-id: trunk@35128 -
2016-12-14 18:40:16 +00:00
svenbarth
12dba952f0 * integration of Part 2 patch of Mantis #30687 with a few adjustments:
- 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 -
2016-12-13 23:03:11 +00:00
michael
0d772ae198 * Patch from Silvio Clecio to remove unused variable (bug ID 31044)
git-svn-id: trunk@35062 -
2016-12-04 11:56:05 +00:00
svenbarth
fde867cd5c * change IIDStr from a field to a property as otherwise the compiler would access the wrong field offset as it assumes RawUnitName to be a 255-byte ShortString
git-svn-id: trunk@35026 -
2016-12-01 12:59:20 +00:00
svenbarth
4fb77b71ec * fix for Mantis #31029, based on the patch provided by Silvio Clécio: PArrayOfByte is not necessary and in fact the purpose of TArrayOfByte is a different one from reference counting (namely to ensure correct passing of the parameter), so renamed accordingly (plus a comment); similar change in SetDynArrayProp. Also Get-/SetPropValue in Variants unit has been adjusted to make use of Get-/SetDynArrayProp.
+ added adjusted test

git-svn-id: trunk@35025 -
2016-11-30 19:32:41 +00:00
svenbarth
345d83c3e3 Merge RTTI changes from packages branch (including adjustments that were required due to changes in trunk since then). These changes favor source backwards compatibility in contrast to Delphi compatibility. Binary compatiblity is however drastically broken due to the indirect references that are platform independant!
Merged revision(s) 28239-28289 from branches/svenbarth/packages:
Provide the possiblity to switch between the direct and indirect RTTI symbols.

ncgrtti.pas, TRTTIWriter:
  + get_rtti_label, get_rtti_label_ord2str & get_rtti_label_str2ord: add new "indirect" parameter and pass that along to rtti_mangledname
hlcgobj.pas, thlcgobj:
  * g_incrrefcount, g_initialize, g_finalize, g_array_rtti_helper: for now pass along False to get_rtti_label()
ncgvmt.pas, TVMTWriter:
  * writevmt: for now pass along False to get_rtti_label()
ncgld.pas, tcgrttinode:
  * pass_generate_code: for now pass along False to the get_rtti_label*() methods
........
Provide possibility to select between using a direct and an indirect RTTI reference. This way the references can be changed for selected cases.

ncgrtti, TRTTIWriter:
  * ref_rtti: new "indirect" parameter that's relayed to rtti_mangledname()
  * write_rtti_reference: new "indirect" paramater that's relayed to ref_rtti()
........
Switch properties to use the indirect type information without breaking backwards compatiblity. :)

compiler/ncgrtti.pas, TRTTIWriter:
  * published_properties_write_rtti_data: use the indirect reference, not the direct one
rtl/objpas/typinfo.pp:
  * to allow compilation with both 2.6.x and 2.7.1 and too avoid too many ifdefs at least in the declarations we define a macro TypeInfoPtr which is either PTypeInfo (2.6.x) or PPTypeInfo (2.7.1 and newer)
  * TPropInfo: rename PropType to PropTypeRef and change type to TypeInfoPtr
  + TPropInfo: add a new property PropType which returns a PTypeInfo out of the PropTypeRef depending on the compiler version
........
Switch further simple types (sets, enums, class references, pointers) to indirect type information (again without breaking backwards compatibility).

compiler/ncgrtti.pas, TRTTIWriter.write_rtti_data:
  * enumdef_rtti, setdef_rtti, classrefdef_rtti & pointerdef_rtti: write an indirect RTTI reference

rtl/objpas/typinfo.pp, TTypeData:
  * rename BaseType to BaseTypeRef, CompType to CompTypeRef, InstanceType to InstanceTypeRef and RefType to RefTypeRef and change their type to TypeInfoPtr
  + add properties BaseType, CompType, InstanceType & RefType which return a PTypeInfo out of the corresponding *Ref field depending on the compiler version
........
Switch class and interface parent as well as extended type to indirect type information

compiler/ncgrtti.pas, TRTTIWriter:
  * write_rtti_data.objectdef_rtti.objectdef_rtti_class_full: use indirect reference for class parent and extended type
  * write_rtti_data.objectdef_rtti.objectdef_rtti_interface_full: use indirect reference for interface parent

rtl/objpas/typinfo.pp, TTypeData:
  + add new method DerefTypeInfoPtr which returns Nil if the indirect reference is Nil and otherwise returns the dereferences indirect reference (for 2.6.x the direct reference is returned as is)
  * rename ParentInfo to ParentInfoRef, HelperParent to HelperParentRef, ExtendedInfo to ExtendedInfoRef, IntfParent ot IntfParentRef and RawIntfParent to RawIntfParentRef and change their type to TypeInfoPtr
  + introduce ParentInfo, HelperParent, ExtendedInfo, IntfParent and RawIntfParent properties that return a PTypeInfo and use the new DerefTypeInfoPtr to return the correct type info value
  * change the other newly introduced properties of TTypeData to use DerefTypeInfoPtr as well to be on the safe side
........
Switch record/object fields to indirect type information references.

compiler/ncgrtti.pas, TRTTIWriter.fields_write_rtti_data:
  * use the indirect reference for the object parent type
  * use the indirect reference for the field type

rtl/inc/rtti.inc:
  * TRecordElement: change TypeInfo to PPointer for 2.7.1 and newer
  * RecordRTTI: correctly dereference the element type for 2.7.1 and newer
  * fpc_copy: correctly reference the element type for 2.7.1 and newer
........
Switch static arrays to indirect RTTI reference.

compiler/ncgrtti.pas, TRTTIWriter.write_rtti_data:
  * arraydef_rtti: write the dimension types and the final field type as indirect references

rtl/inc/rtti.inc:
  * TArrayInfo: switch ElInfo to PPointer for 2.7.1+
  * ArrayRTTI & fpc_copy: correctly dereference ElInfo for 2.7.1+
rtl/objpas/typinfo.pp, TArrayTypeData:
  * switch ElType and Dims to PPTypeInfo; no backwards compatibility needed here as TArrayTypeData was added in 2.7.1 only

tests/test/trtti8.pp: fix test
........
Switch dynamic arrays to indirect RTTI references.

compiler/ncgrtti.pas, TRTTIWriter.write_rtti_data.arraydef_rtti:
  * write indirect references for the two element entries

rtl/inc/dynarr.inc:
  * tdynarraytypedata: change elType2 to PPointer for 2.7.1+
  * fpc_dynarray_clear, fpc_dynarray_setlength & fpc_dynarray_copy: correctly dereference elType2 for 2.7.1+
rtl/objpas/typinfo.pp, TTypeData:
  * rename elType and elType2 to elTypeRef and elType2Ref respectively and change type to TypeInfoPtr
  * add properties elType and elType2 which return PTypeInfo by dereferencing elTypeRef and elType2Ref respecively correctly
  * remove a few stray "inline" directives in the implementation
........
Switch procedure parameters and result type to indirect RTTI references.

compiler/ncgrtti.pas, TRTTIWriter.write_rtti_data.procvardef_rtti:
  * write_procedure_param: use indirect RTTI reference
  * write result info for both methods and procvars as indirect RTTI reference
  * write parameters for procvars as indirect RTTI reference

rtl/objpas/typinfo.pp:
  * TProcedureParam: change type of ParamType to PPTypeInfo (no backwards compatiblity needed here; was added for 2.7.1)
  * TProcedureSignature: change type of RseultType to PPTypeInfo (no backwards compatibility needed here; was added for 2.7.1)
  * TTypeData: remark in the comments of tkMethod that ResultTypeRef and ParamTypeRefs are of type PPTypeInfo and not PTypeInfo

tests/test/trtti9.pp: 
  * fix test
........
Remove no longer needed "indirect" parameter for TRTTIWriter methods.

ncgrtti.pas, TRTTIWriter:
  - ref_rtti & write_rtti_reference: remove "indirect" parameter
  * ref_rtti: call rtti_mangledname with "indirect" always set to "true"
  - remove "true" parameter on callsites of write_rtti_reference & ref_rtti
........

git-svn-id: trunk@33944 -
2016-06-10 17:01:51 +00:00
svenbarth
6d81760136 typinfo.pp, TTypeData:
* document the property data that follows for interface types (both COM and Corba)

git-svn-id: trunk@33106 -
2016-02-19 15:23:52 +00:00
pierre
701a610f4d Use CodePointer for all CheckVariantEvent parameter typecast
git-svn-id: trunk@32864 -
2016-01-06 14:04:31 +00:00
michael
b9da082e29 * Patch from Silvio Clecio to Extends SetPropValue/GetPropValue (bug ID 28278)
git-svn-id: trunk@32858 -
2016-01-05 20:00:41 +00:00
nickysn
e2ed8f2251 * fixed various procvars being casted to pointer instead of codepointer in the rtl
git-svn-id: trunk@32167 -
2015-10-27 17:25:27 +00:00
yury
7c62aadf65 * Fixed string conversion warnings in RTL.
git-svn-id: trunk@31752 -
2015-09-17 17:25:57 +00:00
florian
53d6f6bc55 * handle dyn. arrays and interfaces correctly in TypInfo.SetOrdProp
git-svn-id: trunk@30141 -
2015-03-08 09:40:36 +00:00
nickysn
070955bcd0 * fixed 'data element too large' error in i8086 far data memory models
git-svn-id: trunk@27390 -
2014-03-30 18:17:37 +00:00
nickysn
fec4c6a6e2 * various rtl fixes that allow objpas.integer to be 16-bit on 16-bit targets
(still not sure if it's a good idea, but trying, at least, is harmless - we
  can always rollback to integer being equal to longint)

git-svn-id: trunk@26966 -
2014-03-06 01:10:18 +00:00
nickysn
e8005f9485 * fixed compilation of unit typinfo in the i8086 medium memory model
git-svn-id: trunk@25119 -
2013-07-16 15:13:11 +00:00
nickysn
79db53b049 * TPropInfo.GetProc, .SetProc and .StoredProc changed to CodePointer for compatibility with the i8086 medium memory model
git-svn-id: trunk@25117 -
2013-07-16 14:50:16 +00:00
paul
fa0d5bb66e rtl: add tkBool into TTypeData case (issue #0024538)
git-svn-id: trunk@24794 -
2013-06-03 00:59:23 +00:00
nickysn
4bc99b1315 * use a PtrInt cast in typinfo.SetObjectProp
git-svn-id: trunk@24612 -
2013-05-25 18:47:44 +00:00
nickysn
fe48700483 * another i8086 compilation fix for typinfo
git-svn-id: trunk@24602 -
2013-05-25 15:51:36 +00:00
nickysn
4b220d7261 * fixed 'data element too large' error when compiling typinfo on i8086
git-svn-id: trunk@24600 -
2013-05-25 15:43:26 +00:00
sergei
23cb216435 * RTTI fix for alignment-sensitive targets:
* typinfo.pp: the newly introduced records were added into {$PACKRECORDS 1} area of effect, which  effectively made all records packed, entirely defeating FPC_REQUIRES_PROPER_ALIGNMENT purpose. 
  * added alignment between TProcedureParam records, adjusted TProcedureSignature.GetParam() appropriately.
   * ncgrtti.pas: added two missing alignments and removed a redundant one.
   * tests/test/trtti9.pp: modified to use TProcedureSignature.GetParam() and endian-independent check for parameter flags.

git-svn-id: trunk@24562 -
2013-05-23 16:03:42 +00:00
paul
8b98a38b56 rtl: add a helper method to get TProcedureSignature parameter by index
git-svn-id: trunk@24480 -
2013-05-10 12:41:37 +00:00
paul
cd8690c197 rtl: typo
git-svn-id: trunk@24469 -
2013-05-08 03:10:03 +00:00
paul
bc973e538d compiler: write extended RTTI for tkProcVar (tkProcedure in Delphi)
rtl: add appropriate types for tkProcVar RTTI (based on Delphi help)
+ test

git-svn-id: trunk@24468 -
2013-05-08 02:52:13 +00:00
paul
fe04dedbab compiler: change RTTI size of record field offset from fixed 32bit to platform dependent integer (sizeint) since it is stored this way in the compiler. This is also Delphi compatible, rtl: adopt rtl appropriately
git-svn-id: trunk@24460 -
2013-05-07 11:25:41 +00:00
paul
dce960c97b compiler: write Delphi compatible tkArray RTTI:
- TotalSize of all array dimensions instead of first dimension size
  - Element type of last array dimension
  - dimension information
rtl:
  - adopt array initialization/finalization/copy for the new tkArray RTTI
  - add Delphi compatible TArrayTypeData member for typinfo.TTypeData structure
tests:
  - add a test which checks RTTI information for 2 dimension array

git-svn-id: trunk@24458 -
2013-05-07 09:12:18 +00:00
paul
da35b3c601 compiler, rtl: write CodePage for AnsiString RTTI (Delphi compatible), change TTypeData appropriately + test
git-svn-id: trunk@24444 -
2013-05-05 05:05:08 +00:00
paul
a020440d48 rtl: minor formatting
git-svn-id: trunk@24443 -
2013-05-05 04:30:06 +00:00
paul
1c86a9482b rtl:
- add tkRecord to TTypeData (field and type names are taken from Delphi help)
  - add tkProcedure as alias to tkProcVar

git-svn-id: trunk@24442 -
2013-05-05 04:09:31 +00:00
paul
d18f273f67 compier, rtl: revert 24424 since it fails on some platforms
git-svn-id: trunk@24425 -
2013-05-04 16:16:30 +00:00
paul
e23534eec4 compiler, rtl: some rtti related changes:
- write pint instead of 32 bit for record field offset (compiler uses aintsize = pint in TRecordDef), use PtrInt in RTL for record reading
  - add tkRecord to TTypeData (field and type names are taken from Delphi help)
  - add tkProcedure as alias to tkProcVar

git-svn-id: trunk@24424 -
2013-05-04 16:05:04 +00:00
paul
802b7db26e rtl: fix TTypeData comments
git-svn-id: trunk@24423 -
2013-05-04 14:38:41 +00:00
paul
65877e7111 rtl: fix TTypeData declaration - FPC does not generate PPTypeInfo as Delphi do but PTypeInfo instead
git-svn-id: trunk@24422 -
2013-05-04 13:17:32 +00:00
paul
d90445e5ee compiler, rtl, tests: write Delphi compatible (more or less) type information for Class Reference and Pointer types (mantis #0024367)
git-svn-id: trunk@24421 -
2013-05-04 12:47:05 +00:00
florian
4c472a1569 * due to different result handling of integers and interfaces, GetInterfaceProp cannot use GetOrdProp, resolves #21684
git-svn-id: trunk@20857 -
2012-04-12 21:50:03 +00:00
michael
7069db2194 * Fixed setting of RAW interfaces
git-svn-id: trunk@17391 -
2011-05-02 19:16:53 +00:00
svenbarth
b0b051ae83 Introduce a new type kind for helpers in the RTTI. This is Delphi incompatible, but it's cleaner than Delphi's "let's extend some magic class". This might not matter much though, because according to Google the RTTI for class helpers seems to be rarely used.
* compiler/ncgrtti.pas:
- objectdef_rtti_class_full:
 - don't write the VMT data for helpers
 - write the typeinfo of the extended type (something that Delphi does definitely not support :P )
- objectdef_rtti: write the new type kind for helpers instead that of classes
* compiler/symconst.pas: introduce new type kind constant "tkHelper" before "tkFile" (what is that used for btw?)
* rtl/inc/system.inc: add the constant here as well (why wasn't tkUChar added here?)
* objpas/typinfo.pp: 
- add tkHelper to the TTypeKind enum (but here tkUChar was added?!)
- extend the TTypeData record with the data of helpers

git-svn-id: branches/svenbarth/classhelpers@17240 -
2011-04-03 14:13:00 +00:00
paul
e69de6110b rtl: add mkOperatorOverload to TMethodKind enum
git-svn-id: trunk@16694 -
2011-01-03 16:10:36 +00:00
Jonas Maebe
700aa3cf11 * GetEnumNameCount also counted the unit name after r14511 (mantis #16402)
git-svn-id: trunk@15225 -
2010-05-04 17:59:58 +00:00
paul
24d8a7d833 compiler: start implementation of class constructors/destructors: parsing is ready but at the moment neither class constructors nor destructors are called - this is to be implemented
git-svn-id: trunk@15109 -
2010-04-03 09:14:12 +00:00
paul
d3820bfa58 rtl: add TVmtFieldTable, TVmtFieldEntry to typinfo unit since delphi has that declarations too
git-svn-id: trunk@14754 -
2010-01-20 15:17:06 +00:00
florian
4ddebcbf1c * handle subrange enumeration types in GetEnumValue correctly, resolves #15467
git-svn-id: trunk@14544 -
2010-01-05 16:10:13 +00:00
paul
c83fc67e32 compiler: write correct method kind for constructors,destructors and class methods
git-svn-id: trunk@14512 -
2010-01-01 20:22:02 +00:00
paul
db0f23e643 compiler: write not dummy unit name for enumeration and dynamic array rtti
git-svn-id: trunk@14511 -
2010-01-01 19:32:53 +00:00
paul
17bd267141 compiler, rtl: write calling conventions for tkMethod members (issue #0014573)
git-svn-id: trunk@14508 -
2010-01-01 14:36:33 +00:00
florian
8cecea9b53 * GetEnumName handles subrange types correctly, resolves #15377
git-svn-id: trunk@14461 -
2009-12-22 11:36:47 +00:00
Jonas Maebe
c2c68ddb8f - removed FPC_NEW_BIGENDIAN_SETS define and if(n)defs
* left old cpu-specific set helper code under ifdef FPC_OLD_BIGENDIAN_SETS
    in case someone wants to write new assembler set helpers (although most
    of them should be optimally generated by the compiler already if
    http://wiki.freepascal.org/FPC_HowToDo#Bit.28field.29_getting.2Fsetting_primitives
    are optimally implemented)

git-svn-id: trunk@13582 -
2009-08-23 08:16:40 +00:00
Jonas Maebe
77feb9d45c * fixed setstrprop() for shortstring properties (based on hint by Zawullon,
mantis #14040)

git-svn-id: trunk@13323 -
2009-06-26 11:34:04 +00:00
Jonas Maebe
f2ce99029b * fixed sets in rtti for big endian systems
* changed set sizes in rtti to 1 byte for Delphi compatibility
  * fixed tests/webtbs/tw12038 for the new set sizes
  * documented at http://wiki.freepascal.org/User_Changes_Trunk#Sets_in_RTTI_.28run-time_type_information.29

git-svn-id: trunk@12894 -
2009-03-15 12:06:30 +00:00
ivost
8fe3b40070 * added helper function "FindPropInfo" with additional TypeKind filter parameter
git-svn-id: trunk@11856 -
2008-10-02 21:56:54 +00:00
florian
50012c2357 * fix by Inoussa OUEDRAOGO to improve UnicodeString property handling, resolves #12224
git-svn-id: trunk@11832 -
2008-09-27 13:25:11 +00:00
ivost
fc6ae58b9b * added GetPropList function for TClass parameter
git-svn-id: trunk@11811 -
2008-09-21 00:56:06 +00:00
florian
b178b08ba7 Merged revisions 11665-11738 via svnmerge from
http://svn.freepascal.org/svn/fpc/branches/unicodestring

........
  r11665 | florian | 2008-08-30 13:30:17 +0200 (Sat, 30 Aug 2008) | 1 line
  
  * continued to work on unicodestring type support
........
  r11666 | florian | 2008-08-30 19:02:26 +0200 (Sat, 30 Aug 2008) | 2 lines
  
  * expectloc for wide/ansi/unicode strings is LOC_CONSTANT or LOC_REGISTER now
........
  r11667 | florian | 2008-08-30 20:42:37 +0200 (Sat, 30 Aug 2008) | 1 line
  
  * more unicodestring stuff fixed, test results on win32 are already good
........
  r11670 | florian | 2008-08-30 23:21:48 +0200 (Sat, 30 Aug 2008) | 2 lines
  
  * first fixes for unix bootstrapping
........
  r11683 | ivost | 2008-09-01 12:46:39 +0200 (Mon, 01 Sep 2008) | 2 lines
  
      * fixed 64bit bug in iconvenc.pas
........
  r11689 | florian | 2008-09-01 23:12:34 +0200 (Mon, 01 Sep 2008) | 1 line
  
  * fixed several errors when building on unix
........
  r11694 | florian | 2008-09-03 20:32:43 +0200 (Wed, 03 Sep 2008) | 1 line
  
  * fixed unix compilation
........
  r11695 | florian | 2008-09-03 21:01:04 +0200 (Wed, 03 Sep 2008) | 1 line
  
  * bootstrapping fix
........
  r11696 | florian | 2008-09-03 21:07:18 +0200 (Wed, 03 Sep 2008) | 1 line
  
  * more bootstrapping fixed
........
  r11698 | florian | 2008-09-03 22:47:54 +0200 (Wed, 03 Sep 2008) | 1 line
  
  + two missing compiler procs exported
........
  r11701 | florian | 2008-09-04 16:42:34 +0200 (Thu, 04 Sep 2008) | 2 lines
  
  + lazarus project for the linux rtl
........
  r11702 | florian | 2008-09-04 16:43:27 +0200 (Thu, 04 Sep 2008) | 2 lines
  
  + set unicode string procedures
........
  r11707 | florian | 2008-09-04 23:23:02 +0200 (Thu, 04 Sep 2008) | 2 lines
  
  * fixed several type casting stuff
........
  r11712 | florian | 2008-09-05 22:46:03 +0200 (Fri, 05 Sep 2008) | 1 line
  
  * fixed unicodestring compilation on windows after recent unix changes
........
  r11713 | florian | 2008-09-05 23:35:12 +0200 (Fri, 05 Sep 2008) | 1 line
  
  + UnicodeString support for Variants
........
  r11715 | florian | 2008-09-06 20:59:54 +0200 (Sat, 06 Sep 2008) | 1 line
  
  * patch by Martin Schreiber for UnicodeString streaming
........
  r11716 | florian | 2008-09-06 22:22:55 +0200 (Sat, 06 Sep 2008) | 2 lines
  
  * fixed test
........
  r11717 | florian | 2008-09-07 10:25:51 +0200 (Sun, 07 Sep 2008) | 1 line
  
  * fixed typo when converting tunicodestring to punicodechar
........
  r11718 | florian | 2008-09-07 11:29:52 +0200 (Sun, 07 Sep 2008) | 3 lines
  
  * fixed writing of UnicodeString properties
  * moved some helper routines to unicode headers
........
  r11734 | florian | 2008-09-09 22:38:55 +0200 (Tue, 09 Sep 2008) | 1 line
  
  * fixed bootstrapping
........
  r11735 | florian | 2008-09-10 11:25:28 +0200 (Wed, 10 Sep 2008) | 2 lines
  
  * first fixes for persisten unicodestrings
........
  r11736 | florian | 2008-09-10 14:31:00 +0200 (Wed, 10 Sep 2008) | 3 lines
  
  Initialized merge tracking via "svnmerge" with revisions "1-11663" from 
  http://svn.freepascal.org/svn/fpc/trunk
........
  r11737 | florian | 2008-09-10 21:06:57 +0200 (Wed, 10 Sep 2008) | 3 lines
  
  * fixed unicodestring <-> variant handling
  * fixed unicodestring property reading
........

git-svn-id: trunk@11739 -
2008-09-10 20:14:31 +00:00
florian
67e811db60 * handle booleans correctly in Typinfo.GetEnum*, resolves #11372
git-svn-id: trunk@11284 -
2008-06-26 20:01:31 +00:00
michael
aaa394cb93 * GetPropList returns nil if no items found. Memory Leak stopped in case of exception
git-svn-id: trunk@10580 -
2008-03-29 09:32:13 +00:00
micha
83b7f81f81 + add no-fpu support to compiler/rtl for powerpc-linux (-Cfnone)
git-svn-id: trunk@10422 -
2008-03-02 12:59:02 +00:00
florian
c46b44b797 resolves #10509
* fixed SetInterfaceProp
+ PInterface
* extended trtti1

git-svn-id: trunk@10334 -
2008-02-15 20:54:10 +00:00
michael
067d1ab582 * Added EPropertyConvertError class
git-svn-id: trunk@9598 -
2007-12-30 22:03:56 +00:00
michael
a375df54f2 Implemented get/setinterfaceproperty. Needs checking
git-svn-id: trunk@9597 -
2007-12-30 22:01:53 +00:00
yury
d306e25dc8 * Fixed warnings.
git-svn-id: trunk@9514 -
2007-12-22 12:27:03 +00:00
yury
8b12a7f2c2 * Fixed warnings.
git-svn-id: trunk@9506 -
2007-12-21 23:10:33 +00:00
peter
6ed3d91989 * CompareText for shortstrings added
* optimize CompareText
  * use CompareText for case-insenstive compares in the RTL
  patches from Sergei Gorelkin

git-svn-id: trunk@9384 -
2007-12-02 18:36:20 +00:00
florian
4b172f5973 * made rtti for dyn. arrays more delphi compatible, resolves #9464
git-svn-id: trunk@8853 -
2007-10-19 20:27:45 +00:00
Jonas Maebe
a0b57eddb5 * new internal set format for big endian systems. Advantages:
* varsets ({$packset x}) are now supported on big endian targets
    * gdb now displays sets properly on big endian systems
    * cleanup of generic set code (in, include/exclude, helpers), all
      based on "bitpacked array[] of 0..1" now
  * there are no helpers available yet to convert sets from the old to
    the new format, because the set format will change again slightly
    in the near future (so that e.g. a set of 24..31 will be stored in
    1 byte), and creating two classes of set conversion helpers would
    confuse things (i.e., it's not recommended to use trunk currently for
    programs  which load sets stored to disk by big endian programs compiled
    by previous FPC versions)
  * cross-endian compiling has been tested and still works, but one case
    is not supported: compiling a compiler for a different endianess
    using a starting compiler from before the current revision (so first
    cycle natively, and then use the newly created compiler to create a
    cross-compiler)

git-svn-id: trunk@7395 -
2007-05-19 17:15:15 +00:00
florian
c29455b111 * handle rtti for sets with a size of 1 and 2 properly, resolves #8660
git-svn-id: trunk@7125 -
2007-04-17 20:34:58 +00:00
Jonas Maebe
bdc378e250 * fixed 64 bit compilation
git-svn-id: trunk@6816 -
2007-03-13 08:35:08 +00:00
florian
418222bc32 * handle interfaces et al. correctly in Set/GetOrdProp, resolves #8510
git-svn-id: trunk@6804 -
2007-03-12 19:38:22 +00:00
Vincent Snijders
d87dc4e3f8 * always pass property value by value to the property setter of a method, the optimization (to prevent copying) to pass just the reference doesn't work on arm, for example (bug 8273)
git-svn-id: trunk@6370 -
2007-02-07 22:06:15 +00:00
Jonas Maebe
7b9bccf339 * fixed error due to {$t+} change
git-svn-id: trunk@4805 -
2006-10-05 15:05:36 +00:00
micha
d704af7216 fix compilation for {$T+} linux/win
git-svn-id: trunk@4794 -
2006-10-04 20:43:55 +00:00
peter
3bf8ff56ba * fix calling of stored function with index
git-svn-id: trunk@4743 -
2006-09-28 05:54:51 +00:00
michael
7e3b7caf31 + Additional fixes in setfloatprop needed
git-svn-id: trunk@4728 -
2006-09-25 21:29:40 +00:00
michael
8d6cc357c0 * Fixed bug #7445
git-svn-id: trunk@4727 -
2006-09-25 21:20:47 +00:00
peter
16f121a8bc * reuse generic align()
git-svn-id: trunk@4382 -
2006-08-07 07:03:25 +00:00
michael
736b9ec000 + Patch from Graeme Geldenhuys to add delphi compatibility function
git-svn-id: trunk@2358 -
2006-01-28 18:07:23 +00:00
peter
68e56b9fc7 * write only unique property names in rtti
git-svn-id: trunk@2007 -
2005-12-20 14:44:48 +00:00